[ { "id": "tv_turned_on", "automation": "- id: tv_turned_on\n alias: TV turned on\n triggers:\n - trigger: state\n entity_id: media_player.tv\n to: 'on'\n actions:\n - action: media_player.turn_on\n entity_id: media_player.yamaha\n - action: media_player.select_source\n data:\n entity_id: media_player.yamaha\n source: Optical\n - action: rest_command.yamaha_set_speaker\n data:\n speaker: A\n enable: 'true'\n - action: rest_command.yamaha_set_speaker\n data:\n speaker: B\n enable: 'false'\n - choose:\n - conditions:\n - condition: time\n after: '10:00:00'\n before: '12:00:00'\n sequence:\n - device_id: ec2fe7d396cef72ecca9b83e7419847e\n domain: cover\n entity_id: cover.blind2\n type: set_position\n position: 0\n enabled: false\n - delay:\n hours: 0\n minutes: 0\n seconds: 2\n milliseconds: 0\n - choose:\n - conditions:\n - condition: numeric_state\n entity_id: media_player.yamaha\n attribute: volume_level\n below: 0.5\n sequence:\n - action: media_player.volume_set\n data:\n entity_id: media_player.yamaha\n volume_level: 0.5\n initial_state: 'on'\n mode: single", "config": [ { "name": "TV", "room": "living_room", "type": "media_player", "id": { "entity_id": "media_player.tv", "device_id": null } }, { "name": "Yamaha receiver", "room": "living_room", "type": "media_player", "id": { "entity_id": "media_player.yamaha", "device_id": null } }, { "name": "blind 2", "room": "living_room", "type": "cover", "id": { "entity_id": "cover.blind2", "device_id": "ec2fe7d396cef72ecca9b83e7419847e" } }, { "name": "Yamaha set speaker command", "room": null, "type": "rest_command", "id": { "entity_id": "rest_command.yamaha_set_speaker", "device_id": null } } ] }, { "id": "tv_turned_off", "automation": "- id: tv_turned_off\n alias: TV turned off\n triggers:\n - trigger: state\n entity_id: media_player.tv\n to: 'off'\n actions:\n - action: media_player.select_source\n data:\n entity_id: media_player.yamaha\n source: Spotify\n - condition: time\n after: '11:00'\n before: '13:00'\n - device_id: ec2fe7d396cef72ecca9b83e7419847e\n domain: cover\n entity_id: cover.blind2\n type: set_position\n position: 100\n initial_state: 'on'\n mode: single", "config": [ { "name": "TV", "room": "living_room", "type": "media_player", "id": { "entity_id": "media_player.tv", "device_id": null } }, { "name": "Yamaha receiver", "room": "living_room", "type": "media_player", "id": { "entity_id": "media_player.yamaha", "device_id": null } }, { "name": "blind 2", "room": "living_room", "type": "cover", "id": { "entity_id": "cover.blind2", "device_id": "ec2fe7d396cef72ecca9b83e7419847e" } } ] }, { "id": "lights_on_in_the_evening", "automation": "- alias: Lights on in the evening\n id: lights_on_in_the_evening\n triggers:\n - trigger: sun\n event: sunset\n offset: -00:10:00\n conditions:\n - condition: state\n entity_id: person.martin\n state: home\n actions:\n - action: scene.turn_on\n target:\n entity_id: scene.normal\n data:\n transition: 1200\n - action: light.turn_on\n data:\n transition: 600\n brightness_pct: 68\n target:\n area_id: bedroom", "config": [ { "name": "Martin person tracker", "room": null, "type": "person", "id": { "entity_id": "person.martin", "device_id": null } }, { "name": "normal scene", "room": "living_room", "type": "scene", "id": { "entity_id": "scene.normal", "device_id": null } } ] }, { "id": "lights_on_arrival", "automation": "- id: lights_on_arrival\n alias: Lights On Arrival\n triggers:\n - trigger: state\n entity_id: person.martin\n to: home\n conditions:\n - condition: sun\n after: sunset\n after_offset: -00:10:00\n before: sunrise\n actions:\n - action: light.turn_on\n entity_id: light.hall\n - action: scene.turn_on\n target:\n entity_id: scene.normal\n - action: light.turn_on\n data:\n brightness_pct: 68\n target:\n area_id: bedroom", "config": [ { "name": "Martin person tracker", "room": null, "type": "person", "id": { "entity_id": "person.martin", "device_id": null } }, { "name": "normal scene", "room": "living_room", "type": "scene", "id": { "entity_id": "scene.normal", "device_id": null } }, { "name": "hall light", "room": "hall", "type": "light", "id": { "entity_id": "light.hall", "device_id": null } } ] }, { "id": "sound_controller_volume_down", "automation": "- id: sound_controller_volume_down\n alias: Sound Controller Volume Down\n triggers:\n trigger: event\n event_type: deconz_event\n event_data:\n id: sound_controller\n event: 3001\n actions:\n - action: script.turn_on\n data:\n entity_id: script.volume_down_loop", "config": [ { "name": "sound controller", "room": "living_room", "type": "sensor", "id": { "entity_id": null, "device_id": "sound_controller" } }, { "name": "volume down loop script", "room": null, "type": "script", "id": { "entity_id": "script.volume_down_loop", "device_id": null } } ] }, { "id": "sound_controller_volume_up", "automation": "- id: sound_controller_volume_up\n alias: Sound Controller Volume Up\n triggers:\n trigger: event\n event_type: deconz_event\n event_data:\n id: sound_controller\n event: 2001\n actions:\n - action: script.turn_on\n data:\n entity_id: script.volume_up_loop", "config": [ { "name": "sound controller", "room": "living_room", "type": "sensor", "id": { "entity_id": null, "device_id": "sound_controller" } }, { "name": "volume up loop script", "room": null, "type": "script", "id": { "entity_id": "script.volume_up_loop", "device_id": null } } ] }, { "id": "sound_controller_volume_stop", "automation": "- id: sound_controller_volume_stop\n alias: Sound Controller Volume Stop\n triggers:\n trigger: event\n event_type: deconz_event\n event_data:\n id: sound_controller\n condition: '{{ trigger.event.data.event not in [3001, 2001] }}'\n actions:\n - action: script.turn_off\n data:\n entity_id: script.volume_up_loop\n - action: script.turn_off\n data:\n entity_id: script.volume_down_loop", "config": [ { "name": "sound controller", "room": "living_room", "type": "sensor", "id": { "entity_id": null, "device_id": "sound_controller" } }, { "name": "volume down loop script", "room": null, "type": "script", "id": { "entity_id": "script.volume_down_loop", "device_id": null } }, { "name": "volume up loop script", "room": null, "type": "script", "id": { "entity_id": "script.volume_up_loop", "device_id": null } } ] }, { "id": "sound_controller_switch_yamaha", "automation": "- id: sound_controller_switch_yamaha\n alias: Sound Controller Turn On\n triggers:\n - trigger: event\n event_type: deconz_event\n event_data:\n id: sound_controller\n event: 1002\n conditions:\n - condition: state\n entity_id: media_player.yamaha\n state: 'off'\n actions:\n - action: media_player.turn_on\n data:\n entity_id: media_player.yamaha\n mode: single", "config": [ { "name": "Yamaha receiver", "room": "living_room", "type": "media_player", "id": { "entity_id": "media_player.yamaha", "device_id": null } }, { "name": "sound controller", "room": "living_room", "type": "sensor", "id": { "entity_id": null, "device_id": "sound_controller" } } ] }, { "id": "lights_off", "automation": "- id: lights_off\n alias: Lights off\n triggers:\n - trigger: state\n entity_id: person.martin\n to: not_home\n - trigger: time\n at: '4:00:00'\n actions:\n - action: light.turn_off\n entity_id: all", "config": [ { "name": "Martin person tracker", "room": null, "type": "person", "id": { "entity_id": "person.martin", "device_id": null } } ] }, { "id": "freezer_open_alert", "automation": "- id: freezer_open_alert\n alias: Freezer Open Alert\n triggers:\n trigger: state\n entity_id: binary_sensor.freezer_door\n to: 'on'\n for: 00:10:00\n actions:\n - action: persistent_notification.create\n data:\n title: Freezer open for over 10 minutes\n message: Freezer open for over 10 minutes.\n notification_id: freezer_open_alert\n - action: notify.email\n data:\n title: Freezer open for over 10 minutes\n message: Freezer open for over 10 minutes.", "config": [ { "name": "freezer door sensor", "room": "kitchen", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.freezer_door", "device_id": null } }, { "name": "email notification", "room": null, "type": "notify", "id": { "entity_id": "notify.email", "device_id": null } }, { "name": "persistent notification", "room": null, "type": "persistent_notification", "id": { "entity_id": "persistent_notification.create", "device_id": null } } ] }, { "id": "'1607179755688'", "automation": "- id: '1607179755688'\n alias: Turn off heating\n description: ''\n triggers:\n - trigger: time\n at: input_datetime.heating_off_time\n condition: []\n actions:\n - action: climate.turn_off\n data: {}\n entity_id: climate.heating\n mode: single", "config": [ { "name": "heating off time input", "room": null, "type": "input_datetime", "id": { "entity_id": "input_datetime.heating_off_time", "device_id": null } }, { "name": "heating climate", "room": "living_room", "type": "climate", "id": { "entity_id": "climate.heating", "device_id": null } } ] }, { "id": "'1607525870870'", "automation": "- id: '1607525870870'\n alias: Sound Controller Pause/Resume Spotify\n triggers:\n - trigger: event\n event_type: deconz_event\n event_data:\n id: sound_controller\n event: 1002\n condition: '{{ is_state_attr(''media_player.yamaha'', ''source'', ''Spotify'') }}'\n actions:\n - action: media_player.media_play_pause\n data:\n entity_id: media_player.yamaha\n mode: single", "config": [ { "name": "Yamaha receiver", "room": "living_room", "type": "media_player", "id": { "entity_id": "media_player.yamaha", "device_id": null } }, { "name": "sound controller", "room": "living_room", "type": "sensor", "id": { "entity_id": null, "device_id": "sound_controller" } } ] }, { "id": "'1607526213723'", "automation": "- id: '1607526213723'\n alias: Sound Controller Mute/Unmute\n triggers:\n - trigger: event\n event_type: deconz_event\n event_data:\n id: sound_controller\n event: 1002\n condition: '{{ not is_state(''media_player.yamaha'', ''off'') and not is_state_attr(''media_player.yamaha'',\n ''source'', ''Spotify'') }}'\n actions:\n - action: media_player.volume_mute\n data:\n entity_id: media_player.yamaha\n is_volume_muted: '{{ is_state_attr(''media_player.yamaha'', ''is_volume_muted'',\n false) }}'\n mode: single", "config": [ { "name": "Yamaha receiver", "room": "living_room", "type": "media_player", "id": { "entity_id": "media_player.yamaha", "device_id": null } }, { "name": "sound controller", "room": "living_room", "type": "sensor", "id": { "entity_id": null, "device_id": "sound_controller" } } ] }, { "id": "nightstand_switch_all_off", "automation": "- id: nightstand_switch_all_off\n alias: Nightstand Switch Off\n triggers:\n - trigger: event\n event_type: deconz_event\n event_data:\n id: bedroom_nightstand_switch\n event: 2002\n conditions:\n - condition: state\n entity_id: light.bedroom_lights\n state: 'off'\n for:\n seconds: 1\n actions:\n - choose:\n - conditions:\n - condition: template\n value_template: '{{ states[''light''] | selectattr(''state'',''eq'', ''on'')\n | list | count > 0 }}'\n sequence:\n - action: light.turn_off\n entity_id: all\n - conditions:\n - condition: time\n after: 05:30:00\n before: '12:00:00'\n sequence:\n - action: cover.open_cover\n entity_id: cover.all_blinds\n - action: light.turn_on\n data:\n entity_id: light.kitchen_unit\n brightness_pct: 70\n color_temp_kelvin: 2700\n - choose:\n - conditions:\n - condition: state\n entity_id: input_boolean.heat_in_the_morning\n state: 'on'\n sequence:\n - action: climate.turn_on\n data:\n entity_id: climate.heating\n - action: media_player.turn_on\n entity_id: media_player.yamaha\n - action: media_player.select_source\n data:\n entity_id: media_player.yamaha\n source: Server\n - action: rest_command.yamaha_set_speaker\n data:\n speaker: A\n enable: 'true'\n - action: rest_command.yamaha_set_speaker\n data:\n speaker: B\n enable: 'true'\n - delay:\n hours: 0\n minutes: 0\n seconds: 8\n milliseconds: 0\n - action: media_player.volume_set\n data:\n entity_id: media_player.yamaha\n volume_level: 0.5\n - action: weather.get_forecasts\n target:\n entity_id: weather.forecast\n data:\n type: daily\n response_variable: daily\n - action: tts.google_say\n data:\n entity_id: media_player.yamaha\n message: '\"Good morning Martin!\" \"It''s currently {{states(''sensor.outside_temperature'')}}\n outside\" \"and {{states(''sensor.living_room_temperature'')}} inside.\"\n \"Today''s high will be {{ daily[''weather.forecast''].forecast[0].temperature\n }} degrees.\" '\n mode: single", "config": [ { "name": "Yamaha receiver", "room": "living_room", "type": "media_player", "id": { "entity_id": "media_player.yamaha", "device_id": null } }, { "name": "heating climate", "room": "living_room", "type": "climate", "id": { "entity_id": "climate.heating", "device_id": null } }, { "name": "heat in the morning input", "room": null, "type": "input_boolean", "id": { "entity_id": "input_boolean.heat_in_the_morning", "device_id": null } }, { "name": "bedroom nightstand switch", "room": "bedroom", "type": "sensor", "id": { "entity_id": null, "device_id": "bedroom_nightstand_switch" } }, { "name": "bedroom lights", "room": "bedroom", "type": "light", "id": { "entity_id": "light.bedroom_lights", "device_id": null } }, { "name": "all blinds cover", "room": "living_room", "type": "cover", "id": { "entity_id": "cover.all_blinds", "device_id": null } }, { "name": "kitchen unit light", "room": "kitchen", "type": "light", "id": { "entity_id": "light.kitchen_unit", "device_id": null } }, { "name": "weather forecast", "room": null, "type": "weather", "id": { "entity_id": "weather.forecast", "device_id": null } }, { "name": "outside temperature sensor", "room": "outside", "type": "sensor", "id": { "entity_id": "sensor.outside_temperature", "device_id": null } }, { "name": "living room temperature sensor", "room": "living_room", "type": "sensor", "id": { "entity_id": "sensor.living_room_temperature", "device_id": null } }, { "name": "Yamaha set speaker command", "room": null, "type": "rest_command", "id": { "entity_id": "rest_command.yamaha_set_speaker", "device_id": null } }, { "name": "TTS service", "room": null, "type": "tts", "id": { "entity_id": "tts.google_say", "device_id": null } }, { "name": "weather service", "room": null, "type": "weather", "id": { "entity_id": "weather.get_forecasts", "device_id": null } } ] }, { "id": "nightstand_switch_on", "automation": "- id: nightstand_switch_on\n alias: Nightstand Switch On\n triggers:\n - trigger: event\n event_type: deconz_event\n event_data:\n id: bedroom_nightstand_switch\n event: 1002\n conditions:\n - condition: state\n entity_id: light.bedroom_lights\n state: 'on'\n for:\n seconds: 1\n actions:\n - action: light.turn_off\n target:\n area_id: '{{ area_id(''Living Room'') }}'\n - action: light.turn_on\n data:\n entity_id: light.bedroom_lights\n brightness: 24", "config": [ { "name": "bedroom nightstand switch", "room": "bedroom", "type": "sensor", "id": { "entity_id": null, "device_id": "bedroom_nightstand_switch" } }, { "name": "bedroom lights", "room": "bedroom", "type": "light", "id": { "entity_id": "light.bedroom_lights", "device_id": null } } ] }, { "id": "tasmota_on", "automation": "- id: tasmota_on\n alias: Tasmota On\n initial_state: false\n triggers:\n trigger: event\n event_type: deconz_event\n event_data:\n id: bedroom_nightstand_switch\n event: 2001\n actions:\n - action: mqtt.publish\n data:\n topic: cmnd/tasmota1/POWER\n payload: true", "config": [ { "name": "bedroom nightstand switch", "room": "bedroom", "type": "sensor", "id": { "entity_id": null, "device_id": "bedroom_nightstand_switch" } }, { "name": "tasmota device", "room": "bedroom", "type": "switch", "id": { "entity_id": null, "device_id": "tasmota1" } }, { "name": "MQTT service", "room": null, "type": "mqtt", "id": { "entity_id": "mqtt.publish", "device_id": null } } ] }, { "id": "tasmota_off", "automation": "- id: tasmota_off\n alias: Tasmota Off\n initial_state: false\n triggers:\n trigger: event\n event_type: deconz_event\n event_data:\n id: bedroom_nightstand_switch\n event: 2003\n actions:\n - action: mqtt.publish\n data:\n topic: cmnd/tasmota1/POWER\n payload: false", "config": [ { "name": "bedroom nightstand switch", "room": "bedroom", "type": "sensor", "id": { "entity_id": null, "device_id": "bedroom_nightstand_switch" } }, { "name": "tasmota device", "room": "bedroom", "type": "switch", "id": { "entity_id": null, "device_id": "tasmota1" } }, { "name": "MQTT service", "room": null, "type": "mqtt", "id": { "entity_id": "mqtt.publish", "device_id": null } } ] }, { "id": "tasmota_on_off", "automation": "- id: tasmota_on_off\n alias: Tasmota On Off\n initial_state: false\n triggers:\n trigger: event\n event_type: deconz_event\n event_data:\n id: bedroom_nightstand_switch\n event: 2002\n actions:\n - action: mqtt.publish\n data:\n topic: cmnd/tasmota1/POWER\n payload: true\n - delay:\n seconds: 2\n - action: mqtt.publish\n data:\n topic: cmnd/tasmota1/POWER\n payload: false", "config": [ { "name": "bedroom nightstand switch", "room": "bedroom", "type": "sensor", "id": { "entity_id": null, "device_id": "bedroom_nightstand_switch" } }, { "name": "tasmota device", "room": "bedroom", "type": "switch", "id": { "entity_id": null, "device_id": "tasmota1" } }, { "name": "MQTT service", "room": null, "type": "mqtt", "id": { "entity_id": "mqtt.publish", "device_id": null } } ] }, { "id": "airplay_turned_off", "automation": "- id: airplay_turned_off\n alias: Airplay Turned Off\n initial_state: true\n triggers:\n - trigger: template\n value_template: '{{ not is_state_attr(''media_player.apple_tv'', ''app_id'', ''com.apple.TVAirPlay'')\n }}'\n actions:\n - condition: time\n after: '11:00'\n before: '13:00'\n - action: script.turn_on\n data:\n entity_id: script.apple_tv_sleep", "config": [ { "name": "Apple TV", "room": "living_room", "type": "media_player", "id": { "entity_id": "media_player.apple_tv", "device_id": null } }, { "name": "Apple TV sleep script", "room": null, "type": "script", "id": { "entity_id": "script.apple_tv_sleep", "device_id": null } } ] } ]