AutomationDataset/RealDeco/description-ready.json

194 lines
12 KiB
JSON

[
{
"id": "Now playing → ESPHome cover (PNG)",
"automation": "- alias: Now playing → ESPHome cover (PNG)\n triggers:\n - entity_id: media_player.wrover2\n trigger: state\n conditions:\n - condition: template\n value_template: \"{{ trigger.from_state and trigger.to_state and\\n trigger.from_state.attributes.entity_picture\\\n \\ != trigger.to_state.attributes.entity_picture and\\n state_attr('media_player.wrover2','entity_picture')\\\n \\ not in [None, ''] }}\\n\"\n actions:\n - variables:\n base: http://homeassistant.local:8123\n ep: '{{ state_attr(''media_player.wrover2'',''entity_picture'') }}'\n remote: '{{ state_attr(''media_player.wrover2'',''media_image_url'') }}'\n remote_ok: '{{ is_state_attr(''media_player.wrover2'',''media_image_remotely_accessible'',\n true) and remote not in [None, ''''] }}'\n src_url: \"{% if remote_ok %}{{ remote }} {% else %}\\n {% if ep.startswith('http')\\\n \\ %}{{ ep }}{% else %}{{ base ~ ep }}{% endif %}\\n{% endif %}\\n\"\n bust: '{{ now().timestamp() | int }}'\n final_url: '{{ base ~ ''/local/slides/nowplaying.png?t='' ~ bust }}'\n - data:\n url: '{{ src_url }}'\n subdir: slides\n filename: _incoming.bin\n overwrite: true\n action: downloader.download_file\n - delay: 00:00:01\n - action: shell_command.normalize_image_from_tmp\n data: {}\n - action: shell_command.cleanup_incoming\n data: {}\n - delay: 00:00:01\n - data:\n url: '{{ final_url }}'\n action: esphome.esphome_web_0bac48_show_fullscreen_image\n mode: single",
"config": [
{
"name": "wrover2 media player",
"room": "living_room",
"type": "media_player",
"id": {
"entity_id": "media_player.wrover2",
"device_id": null
}
},
{
"name": "esphome web 0bac48 show fullscreen image",
"room": "office",
"type": "esphome",
"id": {
"entity_id": "esphome.esphome_web_0bac48_show_fullscreen_image",
"device_id": null
}
},
{
"name": "downloader download file",
"room": null,
"type": "downloader",
"id": {
"entity_id": "downloader.download_file",
"device_id": null
}
},
{
"name": "normalize image from tmp shell command",
"room": null,
"type": "shell_command",
"id": {
"entity_id": "shell_command.normalize_image_from_tmp",
"device_id": null
}
},
{
"name": "cleanup incoming shell command",
"room": null,
"type": "shell_command",
"id": {
"entity_id": "shell_command.cleanup_incoming",
"device_id": null
}
}
]
},
{
"id": "request_response_to_dashboard",
"automation": "- alias: request_response_to_dashboard\n description: ''\n triggers:\n - trigger: state\n id: request\n entity_id: sensor.esphome_web_e9f624_text_request\n - trigger: state\n id: response\n entity_id: sensor.esphome_web_e9f624_text_response\n conditions: []\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id: request\n - condition: template\n value_template: '{{ trigger.to_state.state != ''...'' }}'\n sequence:\n - action: input_text.set_value\n target:\n entity_id: input_text.airesponse\n data:\n value: '{{ ''You: '' ~ trigger.to_state.state }}'\n - conditions:\n - condition: trigger\n id: response\n - condition: template\n value_template: '{{ trigger.to_state.state != ''...'' }}'\n sequence:\n - action: input_text.set_value\n target:\n entity_id: input_text.airesponse\n data:\n value: '{{ ''AI: '' ~ trigger.to_state.state }}'\n mode: single\n type: markdown\n content: '# {{ states(''input_text.airesponse'') }}'\n grid_options:\n columns: 12\n rows: 7",
"config": [
{
"name": "esphome web e9f624 text request sensor",
"room": "office",
"type": "sensor",
"id": {
"entity_id": "sensor.esphome_web_e9f624_text_request",
"device_id": null
}
},
{
"name": "esphome web e9f624 text response sensor",
"room": "office",
"type": "sensor",
"id": {
"entity_id": "sensor.esphome_web_e9f624_text_response",
"device_id": null
}
},
{
"name": "airesponse input text",
"room": "office",
"type": "input_text",
"id": {
"entity_id": "input_text.airesponse",
"device_id": null
}
}
]
},
{
"id": "jarvis voice light when thinking",
"automation": "- alias: jarvis voice light when thinking\n description: ''\n triggers:\n - trigger: state\n entity_id:\n - assist_satellite.jarvis_voice_assist_satellite\n to: processing\n conditions: []\n actions:\n - action: light.turn_on\n metadata: {}\n data: {}\n target:\n entity_id: light.esphome_web_0bac48\n - wait_for_trigger:\n - trigger: state\n entity_id:\n - assist_satellite.jarvis_voice_assist_satellite\n to: responding\n - action: light.turn_off\n metadata: {}\n data: {}\n target:\n entity_id: light.esphome_web_0bac48\n mode: single",
"config": [
{
"name": "esphome web 0bac48 light",
"room": "office",
"type": "light",
"id": {
"entity_id": "light.esphome_web_0bac48",
"device_id": null
}
},
{
"name": "jarvis voice assist satellite",
"room": "living_room",
"type": "assist_satellite",
"id": {
"entity_id": "assist_satellite.jarvis_voice_assist_satellite",
"device_id": null
}
}
]
},
{
"id": "Taichi v1 Swipe",
"automation": "- alias: Taichi v1 Swipe\n description: ''\n triggers:\n - trigger: state\n entity_id:\n - binary_sensor.esphome_web_e9f624_swipe_left\n to: 'on'\n id: left\n - trigger: state\n entity_id:\n - binary_sensor.esphome_web_e9f624_swipe_right\n to: 'on'\n id: right\n - trigger: state\n entity_id:\n - binary_sensor.esphome_web_e9f624_swipe_up\n to: 'on'\n id: up\n - trigger: state\n entity_id:\n - binary_sensor.esphome_web_e9f624_swipe_down\n to: 'on'\n id: down\n conditions: []\n actions:\n - choose:\n - conditions:\n - condition: trigger\n id:\n - up\n sequence:\n - action: select.select_next\n metadata: {}\n data:\n cycle: true\n target:\n entity_id: select.esphome_web_e9f624_clock_wallpaper_online\n - conditions:\n - condition: trigger\n id:\n - down\n sequence:\n - action: switch.toggle\n metadata: {}\n data: {}\n target:\n entity_id: switch.esphome_web_e9f624_show_battery_status\n - conditions:\n - condition: trigger\n id:\n - left\n sequence:\n - action: select.select_next\n metadata: {}\n data:\n cycle: true\n target:\n entity_id: select.esphome_web_e9f624_clock_style\n - conditions:\n - condition: trigger\n id:\n - right\n sequence:\n - action: select.select_previous\n metadata: {}\n data:\n cycle: true\n target:\n entity_id: select.esphome_web_e9f624_clock_style\n mode: single",
"config": [
{
"name": "esphome web e9f624 swipe left sensor",
"room": "office",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.esphome_web_e9f624_swipe_left",
"device_id": null
}
},
{
"name": "esphome web e9f624 swipe right sensor",
"room": "office",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.esphome_web_e9f624_swipe_right",
"device_id": null
}
},
{
"name": "esphome web e9f624 swipe up sensor",
"room": "office",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.esphome_web_e9f624_swipe_up",
"device_id": null
}
},
{
"name": "esphome web e9f624 swipe down sensor",
"room": "office",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.esphome_web_e9f624_swipe_down",
"device_id": null
}
},
{
"name": "esphome web e9f624 clock wallpaper online select",
"room": "office",
"type": "select",
"id": {
"entity_id": "select.esphome_web_e9f624_clock_wallpaper_online",
"device_id": null
}
},
{
"name": "esphome web e9f624 show battery status switch",
"room": "office",
"type": "switch",
"id": {
"entity_id": "switch.esphome_web_e9f624_show_battery_status",
"device_id": null
}
},
{
"name": "esphome web e9f624 clock style select",
"room": "office",
"type": "select",
"id": {
"entity_id": "select.esphome_web_e9f624_clock_style",
"device_id": null
}
}
]
},
{
"id": "Talk to <assistant> (dynamic, Xiaozhi Taichi Pi)",
"automation": "- alias: Talk to <assistant> (dynamic, Xiaozhi Taichi Pi)\n mode: single\n triggers:\n - trigger: conversation\n command:\n - talk to {name}\n - let me talk to {name}\n - switch to {name}\n - i want to talk to {name}\n variables:\n select_entity: select.xiaozhi_taichi_pi_assistant\n spoken_raw: '{{ trigger.slots.name | default(trigger.sentence, true) }}'\n spoken: '{{ (spoken_raw | lower | trim) }}'\n opts: '{{ state_attr(select_entity, ''options'') or [] }}'\n chosen: \"{% set s = spoken %} {% set found = namespace(v='') %}\\n{# 1) exact (case-insensitive)\\\n \\ #} {% for o in opts %}\\n {% if o | lower == s %}\\n {% set found.v = o\\\n \\ %}\\n {% endif %}\\n{% endfor %}\\n{# 2) contains / contained-by (handles \\\"\\\n harley\\\", \\\"harley quinn\\\") #} {% if not found.v %}\\n {% for o in opts %}\\n\\\n \\ {% set ol = o | lower %}\\n {% if s in ol or ol in s %}\\n {% set\\\n \\ found.v = o %}\\n {% break %}\\n {% endif %}\\n {% endfor %}\\n{% endif\\\n \\ %}\\n{# 3) common nicknames: drop words like \\\"assistant\\\" #} {% if not found.v\\\n \\ %}\\n {% set s2 = s\\n | replace(' assistant','')\\n | replace(' the ','\\\n \\ ')\\n | trim %}\\n {% for o in opts %}\\n {% set ol = o | lower %}\\n \\\n \\ {% if s2 in ol or ol in s2 %}\\n {% set found.v = o %}\\n {% break\\\n \\ %}\\n {% endif %}\\n {% endfor %}\\n{% endif %}\\n{# 4) fallbacks: \\\"preferred\\\"\\\n \\ if present, else first option #} {% if not found.v %}\\n {% if 'preferred'\\\n \\ in opts %}\\n {% set found.v = 'preferred' %}\\n {% else %}\\n {% set\\\n \\ found.v = (opts | first) if (opts | count) > 0 else '' %}\\n {% endif %}\\n\\\n {% endif %} {{ found.v }}\\n\"\n conditions:\n - condition: template\n value_template: '{{ chosen | length > 0 }}'\n actions:\n - action: select.select_option\n target:\n entity_id: '{{ select_entity }}'\n data:\n option: '{{ chosen }}'\n - set_conversation_response: Okay, switching to {{ chosen }}.",
"config": [
{
"name": "xiaozhi taichi pi assistant select",
"room": "office",
"type": "select",
"id": {
"entity_id": "select.xiaozhi_taichi_pi_assistant",
"device_id": null
}
}
]
}
]