AutomationDataset/skdw/description-ready.json

458 lines
25 KiB
JSON

[
{
"id": "kitchen_hood",
"automation": "- id: kitchen_hood\n alias: YAML Kitchen Hood Control\n description: Automatically manages the kitchen hood state based on whether the cooktop\n is on or off and the status of the countertop lights.\n trigger:\n - platform: state\n entity_id: binary_sensor.cooktop_power\n to: 'on'\n alias: When cooktop turned ON\n - platform: state\n entity_id: binary_sensor.cooktop_power\n to: 'off'\n alias: When cooktop turned OFF\n - platform: state\n entity_id: light.kitchen_countertop\n to: 'off'\n alias: When countertop turned OFF\n condition:\n alias: Conditions per trigger\n condition: or\n conditions:\n - condition: and\n alias: When cooktop turned ON and outlet is OFF\n conditions:\n - condition: trigger\n id: 0\n - condition: state\n entity_id: switch.outlet_kitchen_hood\n state: 'off'\n - condition: and\n alias: When cooktop turned OFF and outlet is ON and countertop is OFF\n conditions:\n - condition: trigger\n id: 1\n - condition: state\n entity_id: switch.outlet_kitchen_hood\n state: 'on'\n - condition: state\n entity_id: light.kitchen_countertop\n state: 'off'\n - condition: and\n alias: When countertop turned ON and outlet is ON\n conditions:\n - condition: trigger\n id: 2\n - condition: state\n entity_id: switch.outlet_kitchen_hood\n state: 'on'\n action:\n - service: '{{ ''switch.turn_on'' if(trigger.to_state.state == ''on'') else ''switch.turn_off''\n }}'\n alias: Toggle the hood outlet\n target:\n entity_id: switch.outlet_kitchen_hood\n mode: single",
"config": [
{
"name": "cooktop power sensor",
"room": "kitchen",
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.cooktop_power",
"device_id": null
}
},
{
"name": "kitchen countertop light",
"room": "kitchen",
"type": "light",
"id": {
"entity_id": "light.kitchen_countertop",
"device_id": null
}
},
{
"name": "kitchen hood outlet",
"room": "kitchen",
"type": "switch",
"id": {
"entity_id": "switch.outlet_kitchen_hood",
"device_id": null
}
}
]
},
{
"id": "home_presence_count_enabled",
"automation": "- id: home_presence_count_enabled\n alias: Home presence - count enabled switches\n description: Count enabled switches for home presence estimation\n mode: queued\n max: 50\n trigger:\n - platform: state\n entity_id: include ../entities/home_presence.yaml\n condition: '{{ trigger.from_state.state = trigger.to_state.state and trigger.from_state.state\n in [''off'', ''on''] and trigger.to_state.state in [''off'', ''on''] }}'\n action:\n - action: '{{ ''counter.decrement'' if trigger.to_state.state == ''off'' else ''counter.increment''\n }}'\n target:\n entity_id: counter.switches_enabled",
"config": [
{
"name": "switches enabled counter",
"room": null,
"type": "counter",
"id": {
"entity_id": "counter.switches_enabled",
"device_id": null
}
}
]
},
{
"id": "hvac_turn_off",
"automation": "- id: hvac_turn_off\n alias: YAML HVAC turn off on leak sensor\n trigger:\n - platform: state\n entity_id: binary_sensor.air_cond_leakage\n to: 'on'\n condition:\n not:\n - condition: state\n entity_id: climate.air_conditioner\n state: 'off'\n action:\n - service: climate.set_hvac_mode\n target:\n entity_id: climate.air_conditioner\n data:\n hvac_mode: 'off'\n - service: notify.mobile_app_iphone_kamil\n data:\n message: Air conditioner turned off - the water container is full\n mode: single",
"config": [
{
"name": "air conditioner leak sensor",
"room": null,
"type": "binary_sensor",
"id": {
"entity_id": "binary_sensor.air_cond_leakage",
"device_id": null
}
},
{
"name": "air conditioner",
"room": null,
"type": "climate",
"id": {
"entity_id": "climate.air_conditioner",
"device_id": null
}
},
{
"name": "iPhone Kamil notification",
"room": null,
"type": "notify",
"id": {
"entity_id": "notify.mobile_app_iphone_kamil",
"device_id": null
}
}
]
},
{
"id": "lights_dim_on_toggle",
"automation": "- id: lights_dim_on_toggle\n alias: YAML Lights - dim on toggle\n description: Adjusts lights brightness and temperature to day/night time\n trigger:\n - platform: state\n entity_id:\n - input_boolean.lights_dim\n action:\n - variables:\n entities:\n - id: light.wardrobe_ceiling\n previous_state: '{{ states(''light.wardrobe_ceiling'') }}'\n - id: light.wardrobe_clothes\n previous_state: '{{ states(''light.wardrobe_clothes'') }}'\n - id: light.bathroom_ceiling\n previous_state: '{{ states(''light.bathroom_ceiling'') }}'\n - id: light.bathroom_mirror\n previous_state: '{{ states(''light.bathroom_mirror'') }}'\n color_temp_kelvin: '{{ 3600 if (states(''input_boolean.lights_dim'') == ''on'')\n else 2000 }}'\n brightness_pct: '{{ 30 if (states(''input_boolean.lights_dim'') == ''on'') else\n 1 }}'\n - service: light.turn_on\n data:\n color_temp_kelvin: '{{ color_temp_kelvin }}'\n brightness_pct: '{{ brightness_pct }}'\n target:\n entity_id: '{{ entities | map(attribute=''id'') | list }}'\n - delay:\n seconds: 2\n - service: light.turn_off\n target:\n entity_id: '{{ entities | selectattr(''previous_state'', ''eq'', ''off'') |\n map(attribute=''id'') | list }}'\n mode: single",
"config": [
{
"name": "lights dim input boolean",
"room": null,
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.lights_dim",
"device_id": null
}
},
{
"name": "wardrobe ceiling light",
"room": "wardrobe",
"type": "light",
"id": {
"entity_id": "light.wardrobe_ceiling",
"device_id": null
}
},
{
"name": "wardrobe clothes light",
"room": "wardrobe",
"type": "light",
"id": {
"entity_id": "light.wardrobe_clothes",
"device_id": null
}
},
{
"name": "bathroom ceiling light",
"room": "bathroom",
"type": "light",
"id": {
"entity_id": "light.bathroom_ceiling",
"device_id": null
}
},
{
"name": "bathroom mirror light",
"room": "bathroom",
"type": "light",
"id": {
"entity_id": "light.bathroom_mirror",
"device_id": null
}
}
]
},
{
"id": "lights_dim_on_morning",
"automation": "- id: lights_dim_on_morning\n alias: YAML lights - dim on morning\n trigger:\n - platform: time\n at: 06:30:00\n action:\n - service: input_boolean.turn_on\n target:\n entity_id:\n - input_boolean.lights_dim\n mode: single",
"config": [
{
"name": "lights dim input boolean",
"room": null,
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.lights_dim",
"device_id": null
}
}
]
},
{
"id": "lights_dim_on_evening",
"automation": "- id: lights_dim_on_evening\n alias: YAML lights - dim on evening\n trigger:\n - platform: time\n at: '22:00:00'\n action:\n - service: input_boolean.turn_off\n target:\n entity_id:\n - input_boolean.lights_dim\n mode: single",
"config": [
{
"name": "lights dim input boolean",
"room": null,
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.lights_dim",
"device_id": null
}
}
]
},
{
"id": "lights_switch2light",
"automation": "- id: lights_switch2light\n alias: YAML Lights - On switch toggle light\n variables:\n lights: include ../entities/lights.yaml\n switches: include ../entities/switches.yaml\n mode: parallel\n max: 20\n trigger:\n - platform: state\n entity_id: include ../entities/switches.yaml\n condition:\n - condition: template\n value_template: '{{ states(lights[switches.index(trigger.entity_id)]) == trigger.from_state.state\n }}'\n - condition: template\n value_template: '{{ trigger.to_state.state == ''on'' or trigger.to_state.state\n == ''off'' }}'\n action:\n - service: '{{ ''light.turn_on'' if(trigger.to_state.state == ''on'') else ''light.turn_off''\n }}'\n target:\n entity_id: '{{ lights[switches.index(trigger.entity_id)] }}'",
"config": []
},
{
"id": "lights_light2switch",
"automation": "- id: lights_light2switch\n alias: YAML Lights - On light toggle switch\n variables:\n lights: include ../entities/lights.yaml\n switches: include ../entities/switches.yaml\n mode: parallel\n max: 20\n trigger:\n - platform: state\n entity_id: include ../entities/lights.yaml\n condition:\n - condition: template\n value_template: '{{ states(switches[lights.index(trigger.entity_id)]) == trigger.from_state.state\n }}'\n - condition: template\n value_template: '{{ trigger.to_state.state == ''on'' or trigger.to_state.state\n == ''off'' }}'\n action:\n - service: '{{ ''switch.turn_on'' if(trigger.to_state.state == ''on'') else ''switch.turn_off''\n }}'\n target:\n entity_id: '{{ switches[lights.index(trigger.entity_id)] }}'",
"config": []
},
{
"id": "light-tripleclick",
"automation": "- id: light-tripleclick\n alias: YAML actions on light switch triple click\n description: Automates actions triggered on light switch triple-click\n variables:\n switches: include ../entities/light_tripleclick_switches.yaml\n actions: include ../entities/light_tripleclick_actions.yaml\n trigger:\n - platform: state\n entity_id: include ../entities/light_tripleclick_switches.yaml\n action:\n - wait_template: '{{ states(trigger.entity_id) = trigger.to_state.state }}'\n timeout:\n seconds: 1\n continue_on_timeout: false\n - wait_template: '{{ states(trigger.entity_id) == trigger.to_state.state }}'\n timeout:\n seconds: 1\n continue_on_timeout: false\n - delay:\n milliseconds: 500\n - action: '{{ actions[switches.index(trigger.entity_id)][''action''] }}'\n target:\n entity_id: '{{ actions[switches.index(trigger.entity_id)][''target''] }}'\n mode: single\n max_exceeded: silent",
"config": []
},
{
"id": "media_radio_fm_update",
"automation": "- id: media_radio_fm_update\n alias: Radio FM station update\n mode: single\n triggers:\n - entity_id: input_select.radio_fm\n trigger: state\n variables:\n preset_id: '{{ state_attr(''input_select.radio_fm'', ''options'').index(trigger.to_state.state)\n + 1 }}'\n actions:\n - action: media_player.onkyo_command\n data:\n entity_id: media_player.pioneer_onkyo\n iscp_command: preset\n iscp_value: '{{ preset_id }}'",
"config": [
{
"name": "radio FM input select",
"room": null,
"type": "input_select",
"id": {
"entity_id": "input_select.radio_fm",
"device_id": null
}
},
{
"name": "pioneer Onkyo media player",
"room": null,
"type": "media_player",
"id": {
"entity_id": "media_player.pioneer_onkyo",
"device_id": null
}
}
]
},
{
"id": "media-radio-net",
"automation": "- id: media-radio-net\n alias: YAML Media - Play Radio NET\n mode: single\n triggers:\n - trigger: state\n entity_id: input_select.media_radio_net\n variables:\n stations: include ../entities/media_radio_net_stations.yaml\n actions:\n - alias: Check the media player availability\n if:\n - condition: template\n value_template: '{{ has_value(''media_player.pioneer_dlna'') == False }}'\n then:\n - stop: Target media_player.pioneer_dlna is not available\n - alias: Get the NET radio station\n variables:\n station: '{{ stations | selectattr(''name'', ''eq'', trigger.to_state.state)\n | first }}'\n - alias: Play NET media\n action: media_player.play_media\n target:\n entity_id: media_player.pioneer_dlna\n data:\n media_content_id: '{{ station[''url''] }}'\n media_content_type: audio/aac",
"config": [
{
"name": "media radio net input select",
"room": null,
"type": "input_select",
"id": {
"entity_id": "input_select.media_radio_net",
"device_id": null
}
},
{
"name": "pioneer DLNA media player",
"room": null,
"type": "media_player",
"id": {
"entity_id": "media_player.pioneer_dlna",
"device_id": null
}
}
]
},
{
"id": "media-radio-net-select-return",
"automation": "- id: media-radio-net-select-return\n alias: YAML Media - Radio NET selector reset to 'Other'\n mode: single\n triggers:\n - trigger: state\n entity_id: media_player.pioneer_dlna\n attribute: media_content_id\n variables:\n radio_net_stations: include ../entities/media_radio_net_stations.yaml\n radio_net_stations_urls: '{{ radio_net_stations | map(attribute=''url'') | list\n }}'\n conditions:\n - '{{ trigger.to_state.state not in radio_net_stations_urls }}'\n actions:\n - action: input_select.select_option\n target:\n entity_id: input_select.media_radio_net\n data:\n option: Other",
"config": [
{
"name": "media radio net input select",
"room": null,
"type": "input_select",
"id": {
"entity_id": "input_select.media_radio_net",
"device_id": null
}
},
{
"name": "pioneer DLNA media player",
"room": null,
"type": "media_player",
"id": {
"entity_id": "media_player.pioneer_dlna",
"device_id": null
}
}
]
},
{
"id": "media_sound_mode",
"automation": "- id: media_sound_mode\n alias: Sound Mode update\n mode: single\n triggers:\n - entity_id: input_select.sound_mode\n trigger: state\n variables:\n listening_mode_value:\n Auto: auto-surround\n Extended: all-ch-stereo\n Surround: dolby-atmos\n Desk: full-mono\n cmt_message:\n Auto: CMT00000000000000000000000000\n Extended: CMT00000000000000000000000000\n Surround: CMT00000000000000000000000000\n Desk: CMT00010100010000000000000000\n tcl_message:\n Auto: TCL000000+02-01000000000-01000000000000000\n Extended: TCL-0C000+02+0E+0A000000-04000000000000000\n Surround: TCL000000+02-01000000000-01000000000000000\n Desk: TCL000-01+02+18000000000-04000000000000000\n actions:\n - action: media_player.onkyo_command\n data:\n entity_id: media_player.pioneer_onkyo\n iscp_command: listening-mode\n iscp_value: '{{ listening_mode_value[trigger.to_state.state] }}'\n - action: media_player.onkyo_message\n data:\n entity_id: media_player.pioneer_onkyo\n iscp_message: '{{ cmt_message[trigger.to_state.state] }}'\n - action: media_player.onkyo_message\n data:\n entity_id: media_player.pioneer_onkyo\n iscp_message: '{{ tcl_message[trigger.to_state.state] }}'",
"config": [
{
"name": "pioneer Onkyo media player",
"room": null,
"type": "media_player",
"id": {
"entity_id": "media_player.pioneer_onkyo",
"device_id": null
}
},
{
"name": "sound mode input select",
"room": null,
"type": "input_select",
"id": {
"entity_id": "input_select.sound_mode",
"device_id": null
}
}
]
},
{
"id": "mqtt_knob",
"automation": "- id: mqtt_knob\n alias: MQTT knob\n mode: queued\n triggers:\n - topic: zigbee2mqtt/Remote Bathroom audio knob\n trigger: mqtt\n - topic: zigbee2mqtt/Remote Bedroom audio knob\n trigger: mqtt\n conditions:\n - condition: template\n value_template: '{{ ''action'' in trigger.payload_json }}'\n actions:\n - variables:\n media_player_entity: '{{ ''media_player.pioneer_onkyo_zone_2'' if (trigger.id\n == ''0'') else ''media_player.pioneer_onkyo_zone_3'' }}'\n command: '{{ trigger.payload_json.action }}'\n step_size: '{{ trigger.payload_json.action_step_size }}'\n step_percent: '{% if is_number(step_size) %} {{ (step_size * 0.0005 ) | float\n }} {% else %} {{ 0 }} {% endif %}'\n - choose:\n - conditions:\n - condition: template\n value_template: '{{ command == ''toggle'' }}'\n sequence:\n - if:\n - condition: template\n value_template: '{{ states(media_player_entity) == \"on\" }}'\n then:\n - target:\n entity_id: '{{ media_player_entity }}'\n data: {}\n action: media_player.turn_off\n else:\n - target:\n entity_id: '{{ media_player_entity }}'\n data: {}\n action: media_player.turn_on\n enabled: true\n - conditions:\n - condition: template\n value_template: '{{ states(media_player_entity) == \"on\" }}'\n - condition: template\n value_template: '{{ command == ''brightness_step_down'' }}'\n sequence:\n - target:\n entity_id: '{{ media_player_entity }}'\n data:\n volume_level: '{{ state_attr(media_player_entity, ''volume_level'') - step_percent\n }}'\n action: media_player.volume_set\n - conditions:\n - condition: template\n value_template: '{{ states(media_player_entity) == \"on\" }}'\n - condition: template\n value_template: '{{ command == ''brightness_step_up'' }}'\n sequence:\n - target:\n entity_id: '{{ media_player_entity }}'\n data:\n volume_level: '{{ state_attr(media_player_entity, ''volume_level'') + step_percent\n }}'\n action: media_player.volume_set",
"config": [
{
"name": "pioneer Onkyo media player",
"room": null,
"type": "media_player",
"id": {
"entity_id": "media_player.pioneer_onkyo",
"device_id": null
}
},
{
"name": "bathroom audio knob",
"room": "bathroom",
"type": "sensor",
"id": {
"entity_id": null,
"device_id": "zigbee2mqtt/Remote Bathroom audio knob"
}
},
{
"name": "bedroom audio knob",
"room": "bedroom",
"type": "sensor",
"id": {
"entity_id": null,
"device_id": "zigbee2mqtt/Remote Bedroom audio knob"
}
},
{
"name": "Onkyo zone 2 media player",
"room": null,
"type": "media_player",
"id": {
"entity_id": "media_player.pioneer_onkyo_zone_2",
"device_id": null
}
},
{
"name": "Onkyo zone 3 media player",
"room": null,
"type": "media_player",
"id": {
"entity_id": "media_player.pioneer_onkyo_zone_3",
"device_id": null
}
}
]
},
{
"id": "mqtt_remote_menu_publish",
"automation": "- alias: Remote menu publish MQTT\n id: mqtt_remote_menu_publish\n description: ''\n mode: parallel\n max: 20\n triggers:\n - trigger: state\n entity_id: sensor.remote_menu_line_1\n - trigger: state\n entity_id: sensor.remote_menu_line_2\n - trigger: state\n entity_id: sensor.remote_menu_line_3\n - trigger: state\n entity_id: sensor.remote_menu_line_4\n - trigger: state\n entity_id: sensor.remote_menu_line_5\n conditions: []\n actions:\n - action: mqtt.publish\n metadata: {}\n data:\n evaluate_payload: false\n qos: '1'\n retain: false\n topic: homeassistant/remote_menu/line_{{ trigger.id }}\n payload: '{{ trigger.to_state.state }}'",
"config": [
{
"name": "remote menu line 1 sensor",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.remote_menu_line_1",
"device_id": null
}
},
{
"name": "remote menu line 2 sensor",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.remote_menu_line_2",
"device_id": null
}
},
{
"name": "remote menu line 3 sensor",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.remote_menu_line_3",
"device_id": null
}
},
{
"name": "remote menu line 4 sensor",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.remote_menu_line_4",
"device_id": null
}
},
{
"name": "remote menu line 5 sensor",
"room": null,
"type": "sensor",
"id": {
"entity_id": "sensor.remote_menu_line_5",
"device_id": null
}
}
]
},
{
"id": "presence-lights",
"automation": "- id: presence-lights\n alias: YAML Presence lights\n description: Automates lights basing on user presence\n variables:\n sensors: include ../entities/presence_sensors.yaml\n lights:\n - light.living_room_sofa\n - light.living_room_desk\n - light.kitchen_countertop\n trigger:\n - platform: state\n entity_id: include ../entities/presence_sensors.yaml\n condition:\n - condition: state\n entity_id: input_boolean.presence_lights\n state: 'on'\n action:\n - service: '{{ ''light.turn_on'' if(trigger.to_state.state == ''on'') else ''light.turn_off''\n }}'\n target:\n entity_id: '{{ lights[sensors.index(trigger.entity_id)] }}'\n mode: parallel",
"config": [
{
"name": "kitchen countertop light",
"room": "kitchen",
"type": "light",
"id": {
"entity_id": "light.kitchen_countertop",
"device_id": null
}
},
{
"name": "presence lights input boolean",
"room": null,
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.presence_lights",
"device_id": null
}
},
{
"name": "living room sofa light",
"room": "living_room",
"type": "light",
"id": {
"entity_id": "light.living_room_sofa",
"device_id": null
}
},
{
"name": "living room desk light",
"room": "living_room",
"type": "light",
"id": {
"entity_id": "light.living_room_desk",
"device_id": null
}
}
]
},
{
"id": "presence-speakers",
"automation": "- id: presence-speakers\n alias: YAML Presence speakers\n description: Automates sound mode basing on user presence\n variables:\n presence_sensors: include ../entities/presence_sensors.yaml\n sound_modes:\n - Auto\n - Desk\n - Extended\n trigger:\n - platform: state\n entity_id: include ../entities/presence_sensors.yaml\n to: 'on'\n condition:\n - condition: state\n entity_id: input_boolean.presence_speakers\n state: 'on'\n action:\n - service: input_select.select_option\n data:\n option: '{{ sound_modes[presence_sensors.index(trigger.entity_id)] }}'\n target:\n entity_id: input_select.sound_mode\n mode: single",
"config": [
{
"name": "sound mode input select",
"room": null,
"type": "input_select",
"id": {
"entity_id": "input_select.sound_mode",
"device_id": null
}
},
{
"name": "presence speakers input boolean",
"room": null,
"type": "input_boolean",
"id": {
"entity_id": "input_boolean.presence_speakers",
"device_id": null
}
}
]
},
{
"id": "on-startup",
"automation": "- id: on-startup\n alias: On Startup\n mode: single\n triggers:\n - trigger: homeassistant\n event: start\n conditions: null\n actions:\n - alias: Populate input_select.media_radio_net options\n sequence:\n - variables:\n stations: include ../entities/media_radio_net_stations.yaml\n stations_names: '{{ (stations | map(attribute=''name'') | list) + [''Other'']\n }}'\n - service: input_select.set_options\n target:\n entity_id: input_select.media_radio_net\n data:\n options: '{{ stations_names }}'\n - action: frontend.set_theme\n metadata: {}\n data:\n mode: dark\n name: skynet",
"config": [
{
"name": "media radio net input select",
"room": null,
"type": "input_select",
"id": {
"entity_id": "input_select.media_radio_net",
"device_id": null
}
}
]
}
]