AutomationDataset/Incipiens/description-ready.json

260 lines
12 KiB
JSON

[
{
"id": "Email triage - classify new",
"automation": "- alias: Email triage - classify new\n description: ''\n triggers:\n - event_type: imap_content\n event_data:\n initial: true\n trigger: event\n actions:\n - action: imap.fetch\n data:\n entry: '{{ entry }}'\n uid: '{{ uid }}'\n response_variable: mail\n - variables:\n email_payload: \"{{ {\\n \\\"sender\\\": trigger.event.data.sender | default(\\\"\\\"\\\n ),\\n \\\"subject\\\": mail.subject | default(\\\"\\\"),\\n \\\"date\\\": (trigger.event.data.date|string)\\\n \\ | default(\\\"\\\"),\\n \\\"body\\\": mail.text | default(\\\"\\\")\\n} | to_json }}\"\n - action: rest_command.llm_email_triage\n response_variable: triage\n data:\n email_payload: '{{ email_payload }}'\n - variables:\n triage_obj: '{{ triage[''content''][''message''][''content''] | from_json }}'\n - variables:\n cat: '{{ (triage_obj.category | lower) | default(''unknown'') }}'\n counters:\n personal: counter.emails_personal\n transaction: counter.emails_transaction\n calendar: counter.emails_calendar\n newsletter: counter.emails_newsletter\n promo: counter.emails_promo\n alert: counter.emails_alert\n receipt: counter.emails_receipt\n support: counter.emails_support\n unknown: counter.emails_unknown\n - data:\n entity_id: '{{ counters.get(cat, ''counter.email_unknown'') }}'\n action: counter.increment\n - action: notify.mobile_app_cph2671\n data:\n title: '[{{ triage_obj.priority }}] {{ mail.subject }}'\n message: '{{ triage_obj.summary }}'\n data:\n actions:\n - action: ARCHIVE\n title: Archive\n - action: SNOOZE_1H\n title: Snooze 1h\n action_data:\n entry_id: '{{ entry }}'\n uid: '{{ uid }}'\n mode: parallel\n variables:\n uid: '{{ trigger.event.data.uid }}'\n entry: '{{ trigger.event.data.entry_id }}'",
"config": [
{
"name": "emails personal counter",
"room": null,
"type": "counter",
"id": {
"entity_id": "counter.emails_personal",
"device_id": null
}
},
{
"name": "emails transaction counter",
"room": null,
"type": "counter",
"id": {
"entity_id": "counter.emails_transaction",
"device_id": null
}
},
{
"name": "emails calendar counter",
"room": null,
"type": "counter",
"id": {
"entity_id": "counter.emails_calendar",
"device_id": null
}
},
{
"name": "emails newsletter counter",
"room": null,
"type": "counter",
"id": {
"entity_id": "counter.emails_newsletter",
"device_id": null
}
},
{
"name": "emails promo counter",
"room": null,
"type": "counter",
"id": {
"entity_id": "counter.emails_promo",
"device_id": null
}
},
{
"name": "emails alert counter",
"room": null,
"type": "counter",
"id": {
"entity_id": "counter.emails_alert",
"device_id": null
}
},
{
"name": "emails receipt counter",
"room": null,
"type": "counter",
"id": {
"entity_id": "counter.emails_receipt",
"device_id": null
}
},
{
"name": "emails support counter",
"room": null,
"type": "counter",
"id": {
"entity_id": "counter.emails_support",
"device_id": null
}
},
{
"name": "emails unknown counter",
"room": null,
"type": "counter",
"id": {
"entity_id": "counter.emails_unknown",
"device_id": null
}
},
{
"name": "email unknown counter",
"room": null,
"type": "counter",
"id": {
"entity_id": "counter.email_unknown",
"device_id": null
}
},
{
"name": "mobile app notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_cph2671",
"device_id": null
}
}
]
},
{
"id": "Fader to Light brightness",
"automation": "- alias: Fader to Light brightness\n description: ''\n triggers:\n - entity_id: media_player.pc_goxlr_sample\n attribute: volume_level\n trigger: state\n conditions:\n - condition: template\n value_template: \"{{ trigger.to_state.attributes.volume_level | float\\n \\\n \\ != trigger.from_state.attributes.volume_level | float }}\"\n actions:\n - target:\n entity_id: light.office_light\n data:\n brightness_pct: '{% set vol = state_attr(''media_player.pc_goxlr_sample'', ''volume_level'')\n | float(0) %} {{ (vol * 100) | round(0) }}\n\n '\n action: light.turn_on\n mode: restart",
"config": [
{
"name": "pc goxlr sample media player",
"room": "office",
"type": "media_player",
"id": {
"entity_id": "media_player.pc_goxlr_sample",
"device_id": null
}
},
{
"name": "office light",
"room": "office",
"type": "light",
"id": {
"entity_id": "light.office_light",
"device_id": null
}
}
]
},
{
"id": "Weather Primary Condition Light",
"automation": "- alias: Weather Primary Condition Light\n description: ''\n triggers:\n - trigger: time\n at:\n entity_id: sensor.cph2671_next_alarm\n offset: -00:00:10\n conditions:\n - condition: zone\n entity_id: person.adamconway\n zone: zone.home\n actions:\n - action: weather.get_forecasts\n metadata: {}\n data:\n type: daily\n target:\n entity_id: weather.pirateweather\n response_variable: wx\n - variables:\n condition: '{{ (wx[''weather.pirateweather''][''forecast''][0].condition if\n wx and wx.get(''weather.pirateweather'') else ''unknown'') | lower }}'\n rgb_map:\n sunny:\n - 255\n - 213\n - 0\n clear:\n - 255\n - 213\n - 0\n partlycloudy:\n - 255\n - 236\n - 140\n cloudy:\n - 255\n - 255\n - 255\n overcast:\n - 235\n - 235\n - 235\n rainy:\n - 64\n - 156\n - 255\n pouring:\n - 32\n - 128\n - 255\n snowy:\n - 200\n - 240\n - 255\n fog:\n - 240\n - 240\n - 240\n windy:\n - 255\n - 245\n - 200\n - action: input_text.set_value\n metadata: {}\n data:\n value: '{{ condition }}'\n target:\n entity_id: input_text.weather_primary_condition\n - variables:\n rgb: \"{{ rgb_map.get(states('input_text.weather_primary_condition'),\\n \\\n \\ [255,255,255]) }}\\n\"\n - action: light.turn_on\n metadata: {}\n data:\n brightness_pct: 80\n rgb_color: '{{ rgb }}'\n target:\n device_id: 7443cc0d215861e4624f05e2ea6c3fb5\n mode: single",
"config": [
{
"name": "next alarm sensor",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.cph2671_next_alarm",
"device_id": null
}
},
{
"name": "person adamconway",
"room": null,
"type": "person",
"id": {
"entity_id": "person.adamconway",
"device_id": null
}
},
{
"name": "home zone",
"room": null,
"type": "zone",
"id": {
"entity_id": "zone.home",
"device_id": null
}
},
{
"name": "pirateweather weather",
"room": null,
"type": "weather",
"id": {
"entity_id": "weather.pirateweather",
"device_id": null
}
},
{
"name": "weather primary condition input",
"room": null,
"type": "input_text",
"id": {
"entity_id": "input_text.weather_primary_condition",
"device_id": null
}
},
{
"name": "unknown light device",
"room": null,
"type": "light",
"id": {
"entity_id": null,
"device_id": "7443cc0d215861e4624f05e2ea6c3fb5"
}
}
]
},
{
"id": "LLM weather forecast notification",
"automation": "- alias: LLM weather forecast notification\n description: ''\n triggers:\n - trigger: time\n at:\n entity_id: sensor.cph2671_next_alarm\n offset: -00:00:10\n conditions:\n - condition: zone\n entity_id: person.adamconway\n zone: zone.home\n actions:\n - action: weather.get_forecasts\n metadata: {}\n data:\n type: daily\n target:\n entity_id: weather.pirateweather\n response_variable: wx\n - action: conversation.process\n metadata: {}\n data:\n agent_id: conversation.google_generative_ai_gemini_2_5_flash_2\n text: \"{# pull the first (today) block #}\\n{% set today_fc = wx['weather.pirateweather']['forecast'][0]\\n\\\n \\ if wx and wx.get('weather.pirateweather') else {} %}\\n\\n\\\n For this task, you are a meteorologist and you are responsible for providing\\\n \\ the user information about the weather for the day. This information will\\\n \\ be provided in the form of a notification on their phone, so keep it brief.\\\n \\ You will provide information on the highest and lowest temperatures, and\\\n \\ also provide guidance on what clothes they should wear for the day, such\\\n \\ as whether a coat is required or not. For example, a cold day may require\\\n \\ a hoodie and a jacket, or a hot but rainy day may require a rain coat. The\\\n \\ weather data is as follows {{ today_fc | to_json }}\"\n response_variable: wresponse\n - action: input_text.set_value\n metadata: {}\n data:\n value: '{{ wresponse.response.speech.plain.speech }}'\n target:\n entity_id: input_text.clothes_suggestion\n - action: notify.mobile_app_cph2671\n metadata: {}\n data:\n message: '{{ wresponse.response.speech.plain.speech }}'\n mode: single",
"config": [
{
"name": "mobile app notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_cph2671",
"device_id": null
}
},
{
"name": "next alarm sensor",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.cph2671_next_alarm",
"device_id": null
}
},
{
"name": "person adamconway",
"room": null,
"type": "person",
"id": {
"entity_id": "person.adamconway",
"device_id": null
}
},
{
"name": "home zone",
"room": null,
"type": "zone",
"id": {
"entity_id": "zone.home",
"device_id": null
}
},
{
"name": "pirateweather weather",
"room": null,
"type": "weather",
"id": {
"entity_id": "weather.pirateweather",
"device_id": null
}
},
{
"name": "clothes suggestion input",
"room": null,
"type": "input_text",
"id": {
"entity_id": "input_text.clothes_suggestion",
"device_id": null
}
},
{
"name": "gemini conversation agent",
"room": null,
"type": "conversation",
"id": {
"entity_id": "conversation.google_generative_ai_gemini_2_5_flash_2",
"device_id": null
}
}
]
}
]