AutomationDataset/galway-it-meetup/description-ready.json

224 lines
14 KiB
JSON

[
{
"id": "Agenda with Shopping List",
"automation": "- alias: Agenda with Shopping List\n description: This automation fetches the weather forecast, the news (via custom\n sensors), calendar events, and shopping list items, processes the information\n using a conversation agent, and sends a notification with the agenda for the day.\n I use telegram as the notification service, but others might be suitable for you!\n triggers:\n - at: 08:00:00\n trigger: time\n - trigger: time\n at: '14:00:00'\n actions:\n - variables:\n weather_entity: weather.home\n calendar_entity: calendar.house\n zone_entity: zone.home\n calendar_duration:\n hours: 18\n sensor_local: '{{ states(''sensor.local_bulletin'') }}'\n sensor_national: '{{ states(''sensor.irish_bulletin'') }}'\n prompt: \"Please generate text that will be sent to the users\\nsmartphone with\\\n \\ helpful information.\\n\\nYou are a helpful personal agent that generates\\\n \\ text for the user:\\n- Your answers are helpful, friendly, warm, insightful.\\n\\\n - Your answers are not technical.\\n- If reporting on weather, headlines or\\\n \\ bulletins, report the information and report it accurately.\\n- Your messages\\\n \\ help the user prepare for their day, for example:\\n - Making note of unusual\\\n \\ weather for the location and time of year\\n - How much time remaining until\\\n \\ their first meeting\\n - Anything that may be special or unique, such as\\\n \\ celebrating a birthday\\n \"\n - alias: Fetch Weather Forecast\n action: weather.get_forecasts\n data:\n type: daily\n target:\n entity_id:\n - '{{ weather_entity }}'\n response_variable: daily_forecast\n - variables:\n forecast_entity: '{{ daily_forecast[weather_entity] }}'\n forecast: '{{ forecast_entity.forecast[0] }}'\n - alias: Fetch Calendar Agenda\n action: calendar.get_events\n data:\n duration:\n hours: 18\n target:\n entity_id: calendar.house\n response_variable: events_response\n - alias: Fetch Shopping List\n action: todo.get_items\n data:\n status: needs_action\n target:\n entity_id: todo.shopping_list\n response_variable: todo_response\n - alias: Fetch Calendar Agenda\n action: calendar.get_events\n data:\n duration:\n hours: 18\n target:\n entity_id: calendar.house\n response_variable: events_response\n - alias: Conversation Agent Notification Text\n action: conversation.process\n data:\n text: \"Time: {{ now().strftime(\\\"%A %B %d %H:%M %p\\\") }}\\n{%- if weather_entity\\\n \\ is defined %}\\n{%- set temperature_unit = state_attr(weather_entity, 'temperature_unit')\\\n \\ -%}\\nForecast: {{ forecast.condition }} ({{ forecast.temperature }}{{ temperature_unit\\\n \\ }}, {{ forecast.precipitation }}% precipitation)\\n{%- endif %}\\nLocal News\\\n \\ Headlines - {{ sensor_local }} National News - {{ sensor_national }}\\n\\\n Calendar \\\"{{ state_attr(calendar_entity, 'friendly_name') }}\\\" events for\\\n \\ the next {{ calendar_duration.hours }} hours:\\n{%- set agenda = (events_response\\\n \\ | items | first)[1] %}\\n{%- if agenda.events %}\\n {%- for event in agenda.events\\\n \\ %}\\n - Summary: {{ event.summary }}\\n Start-End: {% if event.start is\\\n \\ defined %}{{ event.start }} to {{ event.end }}{% else %}All Day{% endif\\\n \\ %}\\n {%- if event.description is defined %}\\n Description: {{ event.description\\\n \\ }}\\n {% endif -%}\\n {%- if event.location is defined %}\\n Location:\\\n \\ {{ event.location }}\\n {% endif -%}\\n {%- endfor %}\\n{%- else %}\\n \\\n \\ - No upcoming events.\\n{%- endif %}\\n{{ prompt }}\"\n agent_id: conversation.google_generative_ai\n response_variable: agent\n - sequence:\n - alias: Send notification\n action: notify.telegram_bot\n data:\n target: null\n title: '{{ now().strftime(''%A'') }} Agenda'\n message: '{{ agent.response.speech.plain.speech }}'\n enabled: true\n - delay:\n hours: 0\n minutes: 0\n seconds: 1\n milliseconds: 0\n - alias: Send notification\n action: notify.telegram_bot\n data:\n target: null\n title: 'Headlines:'\n message: '{{ sensor_local }}, {{ sensor_national }}'\n enabled: false\n - alias: Send notification\n action: notify.telegram_bot\n data:\n target: null\n title: 'Current Shopping List:'\n message: '{{ todo_response[''todo.shopping_list''][''items''] | map(attribute=''summary'')\n | list }}'",
"config": [
{
"name": "home weather",
"room": "home",
"type": "weather",
"id": {
"entity_id": "weather.home",
"device_id": null
}
},
{
"name": "house calendar",
"room": "home",
"type": "calendar",
"id": {
"entity_id": "calendar.house",
"device_id": null
}
},
{
"name": "home zone",
"room": "home",
"type": "zone",
"id": {
"entity_id": "zone.home",
"device_id": null
}
},
{
"name": "local bulletin sensor",
"room": "local",
"type": "sensor",
"id": {
"entity_id": "sensor.local_bulletin",
"device_id": null
}
},
{
"name": "irish bulletin sensor",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.irish_bulletin",
"device_id": null
}
},
{
"name": "shopping list",
"room": null,
"type": "todo",
"id": {
"entity_id": "todo.shopping_list",
"device_id": null
}
},
{
"name": "telegram bot notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.telegram_bot",
"device_id": null
}
},
{
"name": "google generative ai conversation agent",
"room": null,
"type": "conversation",
"id": {
"entity_id": "conversation.google_generative_ai",
"device_id": null
}
}
]
},
{
"id": "Who's at the door?",
"automation": "- alias: Who's at the door?\n description: Summarizes motion events detected by the doorbell camera.\n triggers:\n - trigger: state\n entity_id:\n - binary_sensor.camera_cell_motion_detection_3\n - binary_sensor.camera_cell_motion_detection\n - binary_sensor.camera_cell_motion_detection_2\n to: 'on'\n conditions: []\n actions:\n - action: llmvision.stream_analyzer\n metadata: {}\n data:\n remember: true\n use_memory: true\n duration: 5\n max_frames: 4\n include_filename: false\n target_width: 1280\n max_tokens: 100\n temperature: 0.2\n generate_title: true\n expose_images: true\n image_entity:\n - camera.camera_fluent\n message: Summarize the events based on a series of images captured at short\n intervals. You are a doorbell camera, looking out onto a common footpath.\n Focus only on moving subjects such as people, vehicles, and other active elements.\n Ignore static objects and scenery. Provide a clear and concise account of\n movements and interactions. Do not mention or imply the existence of images—present\n the information as if directly observing the events. If there is no movement\n detected in any frames, return only 'all clear'\n provider: 01JTRRH7YMV69TQVWZRAX2EX2R\n response_variable: llm_response\n - action: llmvision.remember\n metadata: {}\n data:\n camera_entity: camera.camera_fluent\n title: Motion detected\n summary: ''\n enabled: false\n - if:\n - condition: or\n conditions:\n - condition: and\n conditions:\n - condition: template\n value_template: '{{ llm_response.response_text != ''All clear'' }}'\n - condition: template\n value_template: '{{ llm_response.response_text != ''All clear.'' }}'\n - condition: template\n value_template: '{{ llm_response.response_text != ''all clear.'' }}'\n - condition: template\n value_template: '{{ llm_response.response_text != ''all clear'' }}'\n then:\n - action: input_text.set_value\n metadata: {}\n data:\n value: '{{ now().strftime(''%d-%m %H:%M:%S'') }} - {{ llm_response.response_text\n }}'\n target:\n entity_id: input_text.vision_llm\n - action: notify.mobile_app_phone\n metadata: {}\n data:\n message: '{{ llm_response.response_text }}'\n title: Spotted\n - action: camera.snapshot\n metadata: {}\n target:\n entity_id: camera.camera_fluent\n data:\n filename: /tmp/{{ camera.camera_fluent }}_{{ now().strftime(\"%Y%m%d-%H%M%S\")\n }}.jpg\n enabled: false\n - delay:\n hours: 0\n minutes: 2\n seconds: 0\n milliseconds: 0\n mode: single",
"config": [
{
"name": "camera motion detection 1",
"room": "door",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.camera_cell_motion_detection_3",
"device_id": null
}
},
{
"name": "camera motion detection 2",
"room": "door",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.camera_cell_motion_detection",
"device_id": null
}
},
{
"name": "camera motion detection 3",
"room": "door",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.camera_cell_motion_detection_2",
"device_id": null
}
},
{
"name": "camera fluent",
"room": "door",
"type": "camera",
"id": {
"entity_id": "camera.camera_fluent",
"device_id": null
}
},
{
"name": "vision llm input text",
"room": null,
"type": "input_text",
"id": {
"entity_id": "input_text.vision_llm",
"device_id": null
}
},
{
"name": "phone mobile app notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_phone",
"device_id": null
}
},
{
"name": "llmvision stream analyzer",
"room": null,
"type": "llmvision",
"id": {
"entity_id": "llmvision.stream_analyzer",
"device_id": null
}
},
{
"name": "llmvision remember",
"room": null,
"type": "llmvision",
"id": {
"entity_id": "llmvision.remember",
"device_id": null
}
}
]
},
{
"id": "Baked beans tag is scanned",
"automation": "- alias: Baked beans tag is scanned\n description: Adds Baked Beans to the shopping list when the tag is scanned, and\n sends a notification to mobile apps. Useful for all sorts of shopping, especially\n when you run out of something and need to add it to the list quickly.\n triggers:\n - trigger: tag\n tag_id: a22c63a0-43e0-42e7-ad5b-f3274500cda4\n conditions: []\n actions:\n - action: shopping_list.add_item\n metadata: {}\n data:\n name: Baked Beans\n - action: notify.mobile_app_erdnuss\n metadata: {}\n data:\n message: Baked Beans added\n title: Addition to shopping list\n - action: notify.mobile_app_xiaomi\n metadata: {}\n data:\n message: Baked Beans added\n title: Addition to shopping list\n mode: single",
"config": [
{
"name": "baked beans tag",
"room": null,
"type": "tag",
"id": {
"entity_id": null,
"device_id": "a22c63a0-43e0-42e7-ad5b-f3274500cda4"
}
},
{
"name": "erdnuss mobile app notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_erdnuss",
"device_id": null
}
},
{
"name": "xiaomi mobile app notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_xiaomi",
"device_id": null
}
}
]
},
{
"id": "Tomorrow Weather Check",
"automation": "- alias: Tomorrow Weather Check\n description: Sends a notification if a web scrape sensor indicates a weather alert\n for tomorrow, ensuring household members are informed of any weather warnings.\n triggers:\n - entity_id:\n - sensor.tomorrow_web_scrape_color\n to: null\n enabled: true\n trigger: state\n conditions:\n - condition: template\n value_template: '{{ trigger.to_state.state != ''Currently no warnings in operation.''\n }}'\n - condition: template\n value_template: '{{ trigger.to_state.state != ''unavailable'' }}'\n - condition: template\n value_template: '{{ trigger.to_state.state != null }}'\n - condition: template\n value_template: '{{ trigger.to_state.state != Gray }}'\n - condition: template\n value_template: '{{ trigger.to_state.state != ''Gray'' }}'\n actions:\n - variables:\n msg: A {{ trigger.to_state.state }} Weather Alert for Tomorrow Has Been Issued!\n - data:\n title: Weather Alert Tomorrow!\n message: '{{ msg }}'\n data:\n tag: weather_alert\n action: notify.mobile_app_phone\n - data:\n title: Weather Alert Tomorrow!\n message: '{{ msg }}'\n data:\n tag: weather_alert\n action: notify.mobile_app_phone_2\n mode: single",
"config": [
{
"name": "tomorrow web scrape color sensor",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.tomorrow_web_scrape_color",
"device_id": null
}
},
{
"name": "phone mobile app notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_phone",
"device_id": null
}
},
{
"name": "phone 2 mobile app notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_phone_2",
"device_id": null
}
}
]
}
]