[ { "id": "bedroom_blackout", "automation": "- alias: Bedroom Blackout\n id: bedroom_blackout\n description: 'Close the bedroom blackout blinds when we''re sleeping in, and open\n when we wake up.\n\n '\n mode: queued\n triggers:\n - trigger: state\n entity_id: sensor.weather\n to: night\n - trigger: state\n entity_id: sensor.weather\n from: night\n not_to: unavailable\n - trigger: state\n entity_id: binary_sensor.anyone_asleep\n to:\n - 'on'\n - 'off'\n - trigger: state\n entity_id: binary_sensor.bedroom_window\n to: 'off'\n for:\n seconds: 3\n actions:\n - choose:\n - conditions:\n - not:\n - condition: state\n entity_id: sensor.weather\n state: night\n - condition: state\n entity_id: binary_sensor.anyone_asleep\n state: 'off'\n sequence:\n - action: scene.turn_on\n target:\n entity_id: scene.bedroom_blackout_open\n - conditions:\n - not:\n - condition: state\n entity_id: sensor.weather\n state: night\n - condition: state\n entity_id: binary_sensor.anyone_asleep\n state: 'on'\n - condition: state\n entity_id: binary_sensor.bedroom_window\n state: 'off'\n sequence:\n - action: scene.turn_on\n target:\n entity_id: scene.bedroom_blackout\n - conditions:\n - condition: sun\n before: sunrise\n after: sunrise\n after_offset: -03:00:00\n - condition: state\n entity_id: binary_sensor.anyone_asleep\n state: 'on'\n - condition: state\n entity_id: binary_sensor.bedroom_window\n state: 'off'\n sequence:\n - action: scene.turn_on\n target:\n entity_id: scene.bedroom_blackout", "config": [ { "name": "weather sensor", "room": "outdoor", "type": "sensor", "id": { "entity_id": "sensor.weather", "device_id": null } }, { "name": "anyone asleep sensor", "room": "bedroom", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.anyone_asleep", "device_id": null } }, { "name": "bedroom window sensor", "room": "bedroom", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.bedroom_window", "device_id": null } }, { "name": "bedroom blackout open scene", "room": "bedroom", "type": "scene", "id": { "entity_id": "scene.bedroom_blackout_open", "device_id": null } }, { "name": "bedroom blackout scene", "room": "bedroom", "type": "scene", "id": { "entity_id": "scene.bedroom_blackout", "device_id": null } } ] }, { "id": "bedroom_play", "automation": "- alias: Bedroom Play\n id: bedroom_play\n description: 'Set scenes while playing in the bedroom.\n\n '\n mode: queued\n triggers:\n - trigger: state\n entity_id: input_boolean.bedroom_play\n to:\n - 'on'\n - 'off'\n actions:\n - choose:\n - conditions:\n - condition: state\n entity_id: input_boolean.bedroom_play\n state: 'on'\n sequence:\n - action: light.turn_on\n target:\n entity_id:\n - light.bedroom_bed_left\n - light.bedroom_bed_right\n - light.bedroom_wall_left\n - light.bedroom_wall_right\n - light.bedroom_left_bedside\n - light.bedroom_right_bedside\n - delay:\n seconds: 3\n - action: scene.create\n data:\n scene_id: bedroom_play\n snapshot_entities:\n - light.bedroom_bed_left\n - light.bedroom_bed_right\n - light.bedroom_wall_left\n - light.bedroom_wall_right\n - light.bedroom_left_bedside\n - light.bedroom_right_bedside\n - action: script.bedroom_play\n - conditions:\n - condition: state\n entity_id: input_boolean.bedroom_play\n state: 'off'\n sequence:\n - action: scene.turn_on\n target:\n entity_id: scene.bedroom_play\n - action: scene.delete\n target:\n entity_id: scene.bedroom_play", "config": [ { "name": "bedroom play input boolean", "room": "bedroom", "type": "input_boolean", "id": { "entity_id": "input_boolean.bedroom_play", "device_id": null } }, { "name": "bedroom bed left light", "room": "bedroom", "type": "light", "id": { "entity_id": "light.bedroom_bed_left", "device_id": null } }, { "name": "bedroom bed right light", "room": "bedroom", "type": "light", "id": { "entity_id": "light.bedroom_bed_right", "device_id": null } }, { "name": "bedroom wall left light", "room": "bedroom", "type": "light", "id": { "entity_id": "light.bedroom_wall_left", "device_id": null } }, { "name": "bedroom wall right light", "room": "bedroom", "type": "light", "id": { "entity_id": "light.bedroom_wall_right", "device_id": null } }, { "name": "bedroom left bedside light", "room": "bedroom", "type": "light", "id": { "entity_id": "light.bedroom_left_bedside", "device_id": null } }, { "name": "bedroom right bedside light", "room": "bedroom", "type": "light", "id": { "entity_id": "light.bedroom_right_bedside", "device_id": null } }, { "name": "bedroom play script", "room": "bedroom", "type": "script", "id": { "entity_id": "script.bedroom_play", "device_id": null } }, { "name": "bedroom play scene", "room": "bedroom", "type": "scene", "id": { "entity_id": "scene.bedroom_play", "device_id": null } } ] }, { "id": "dining_room_blinds", "automation": "- alias: Dining Room Blinds\n id: dining_room_blinds\n description: 'Open and close the dining room window blinds based on the time of\n day, sun position, and weather.\n\n '\n mode: queued\n triggers:\n - trigger: numeric_state\n entity_id: sun.sun\n attribute: azimuth\n above: 220\n - trigger: numeric_state\n entity_id: sun.sun\n attribute: elevation\n below: 55\n - trigger: numeric_state\n entity_id: sun.sun\n attribute: elevation\n below: 45\n - trigger: numeric_state\n entity_id: sun.sun\n attribute: elevation\n below: 24\n - trigger: numeric_state\n entity_id: sun.sun\n attribute: elevation\n below: 5.5\n - trigger: state\n entity_id: sensor.weather\n not_to: unavailable\n - trigger: state\n entity_id: binary_sensor.dining_room_top_windows\n to: 'off'\n for:\n seconds: 3\n id: close\n - trigger: state\n entity_id: binary_sensor.dining_room_bottom_windows\n to: 'off'\n for:\n seconds: 3\n id: close\n - trigger: state\n entity_id: media_player.loft_tv\n to:\n - 'on'\n - 'off'\n - trigger: state\n entity_id: input_boolean.dining_room_play\n to:\n - 'on'\n - 'off'\n - trigger: state\n entity_id: input_boolean.loft_play\n to:\n - 'on'\n - 'off'\n actions:\n - variables:\n target: none\n - choose:\n - conditions:\n - condition: numeric_state\n entity_id: sun.sun\n attribute: azimuth\n above: 220\n - condition: numeric_state\n entity_id: sun.sun\n attribute: elevation\n above: 5.5\n below: 24\n - condition: state\n entity_id: sensor.weather\n state:\n - hot-day\n - day\n sequence:\n - variables:\n target: 100\n - conditions:\n - condition: state\n entity_id: input_boolean.dining_room_play\n state: 'on'\n sequence:\n - variables:\n target: 100\n - conditions:\n - condition: numeric_state\n entity_id: sun.sun\n attribute: azimuth\n above: 220\n - condition: numeric_state\n entity_id: sun.sun\n attribute: elevation\n above: 24\n below: 45\n - condition: state\n entity_id: sensor.weather\n state:\n - hot-day\n - day\n sequence:\n - variables:\n target: 66\n - conditions:\n - condition: numeric_state\n entity_id: sun.sun\n attribute: azimuth\n above: 220\n - condition: numeric_state\n entity_id: sun.sun\n attribute: elevation\n above: 45\n below: 55\n - condition: state\n entity_id: sensor.weather\n state:\n - hot-day\n - day\n sequence:\n - variables:\n target: 33\n - conditions:\n - condition: state\n entity_id: input_boolean.loft_play\n state: 'on'\n sequence:\n - variables:\n target: 33\n - conditions:\n - not:\n - condition: state\n entity_id: sensor.weather\n state: night\n - condition: state\n entity_id: media_player.loft_tv\n state: 'on'\n sequence:\n - variables:\n target: 33\n - conditions:\n - not:\n - condition: state\n entity_id: sensor.weather\n state: night\n sequence:\n - variables:\n target: 0\n - conditions:\n - condition: state\n entity_id: sensor.weather\n state: night\n sequence:\n - variables:\n target: -1\n - choose:\n - conditions:\n - '{{ target >= 100 }}'\n - condition: state\n entity_id: binary_sensor.dining_room_top_windows\n state: 'off'\n - condition: state\n entity_id: binary_sensor.dining_room_bottom_windows\n state: 'off'\n sequence:\n - action: scene.turn_on\n target:\n entity_id: scene.dining_room_evening_sun\n - conditions:\n - '{{ target >= 66 }}'\n - condition: state\n entity_id: binary_sensor.dining_room_top_windows\n state: 'off'\n sequence:\n - action: scene.turn_on\n target:\n entity_id: scene.dining_room_late_afternoon_sun\n - conditions:\n - '{{ target >= 33 }}'\n - condition: state\n entity_id: binary_sensor.dining_room_top_windows\n state: 'off'\n sequence:\n - action: scene.turn_on\n target:\n entity_id: scene.dining_room_afternoon_sun\n - conditions:\n - '{{ target >= 0 }}'\n sequence:\n - action: scene.turn_on\n target:\n entity_id: scene.dining_room_daytime\n - conditions:\n - '{{ target < 0 }}'\n sequence:\n - action: scene.turn_on\n target:\n entity_id: scene.dining_room_nighttime", "config": [ { "name": "weather sensor", "room": "outdoor", "type": "sensor", "id": { "entity_id": "sensor.weather", "device_id": null } }, { "name": "sun sun sensor", "room": "outdoor", "type": "sensor", "id": { "entity_id": "sun.sun", "device_id": null } }, { "name": "dining room top windows sensor", "room": "dining_room", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.dining_room_top_windows", "device_id": null } }, { "name": "dining room bottom windows sensor", "room": "dining_room", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.dining_room_bottom_windows", "device_id": null } }, { "name": "loft tv media player", "room": "loft", "type": "media_player", "id": { "entity_id": "media_player.loft_tv", "device_id": null } }, { "name": "dining room play input boolean", "room": "dining_room", "type": "input_boolean", "id": { "entity_id": "input_boolean.dining_room_play", "device_id": null } }, { "name": "loft play input boolean", "room": "loft", "type": "input_boolean", "id": { "entity_id": "input_boolean.loft_play", "device_id": null } }, { "name": "dining room evening sun scene", "room": "dining_room", "type": "scene", "id": { "entity_id": "scene.dining_room_evening_sun", "device_id": null } }, { "name": "dining room late afternoon sun scene", "room": "dining_room", "type": "scene", "id": { "entity_id": "scene.dining_room_late_afternoon_sun", "device_id": null } }, { "name": "dining room afternoon sun scene", "room": "dining_room", "type": "scene", "id": { "entity_id": "scene.dining_room_afternoon_sun", "device_id": null } }, { "name": "dining room daytime scene", "room": "dining_room", "type": "scene", "id": { "entity_id": "scene.dining_room_daytime", "device_id": null } }, { "name": "dining room nighttime scene", "room": "dining_room", "type": "scene", "id": { "entity_id": "scene.dining_room_nighttime", "device_id": null } }, { "name": "loft media player", "room": "loft", "type": "media_player", "id": { "entity_id": "media_player.loft", "device_id": null } } ] }, { "id": "dining_room_play", "automation": "- alias: Dining Room Play\n id: dining_room_play\n description: 'Set scenes while playing in the Dining Room.\n\n '\n mode: queued\n triggers:\n - trigger: state\n entity_id: input_boolean.dining_room_play\n to:\n - 'on'\n - 'off'\n actions:\n - choose:\n - conditions:\n - condition: state\n entity_id: input_boolean.dining_room_play\n state: 'on'\n sequence:\n - action: light.turn_on\n target:\n entity_id:\n - light.dining_room_beam\n - light.dining_room_south_left\n - light.dining_room_south_right\n - light.dining_room_west_left\n - light.dining_room_west_center\n - light.dining_room_west_right\n - delay:\n seconds: 3\n - action: scene.create\n data:\n scene_id: dining_room_play\n snapshot_entities:\n - light.dining_room_beam\n - light.dining_room_south_left\n - light.dining_room_south_right\n - light.dining_room_west_left\n - light.dining_room_west_center\n - light.dining_room_west_right\n - action: script.dining_room_play\n - conditions:\n - condition: state\n entity_id: input_boolean.dining_room_play\n state: 'off'\n sequence:\n - action: scene.turn_on\n target:\n entity_id: scene.dining_room_play\n - action: scene.delete\n target:\n entity_id: scene.dining_room_play", "config": [ { "name": "dining room play input boolean", "room": "dining_room", "type": "input_boolean", "id": { "entity_id": "input_boolean.dining_room_play", "device_id": null } }, { "name": "dining room beam light", "room": "dining_room", "type": "light", "id": { "entity_id": "light.dining_room_beam", "device_id": null } }, { "name": "dining room south left light", "room": "dining_room", "type": "light", "id": { "entity_id": "light.dining_room_south_left", "device_id": null } }, { "name": "dining room south right light", "room": "dining_room", "type": "light", "id": { "entity_id": "light.dining_room_south_right", "device_id": null } }, { "name": "dining room west left light", "room": "dining_room", "type": "light", "id": { "entity_id": "light.dining_room_west_left", "device_id": null } }, { "name": "dining room west center light", "room": "dining_room", "type": "light", "id": { "entity_id": "light.dining_room_west_center", "device_id": null } }, { "name": "dining room west right light", "room": "dining_room", "type": "light", "id": { "entity_id": "light.dining_room_west_right", "device_id": null } }, { "name": "dining room play script", "room": "dining_room", "type": "script", "id": { "entity_id": "script.dining_room_play", "device_id": null } }, { "name": "dining room play scene", "room": "dining_room", "type": "scene", "id": { "entity_id": "scene.dining_room_play", "device_id": null } } ] }, { "id": "dining_room_tabletop", "automation": "- alias: Dining Room Tabletop\n id: dining_room_tabletop\n description: 'Set dining room light scenes based on the tabletop TV.\n\n '\n mode: queued\n triggers:\n - trigger: state\n entity_id: media_player.dining_room_tabletop\n to: null\n id: tabletop\n - trigger: state\n entity_id: sensor.weather\n to: night\n actions:\n - choose:\n - conditions:\n - condition: state\n entity_id: media_player.dining_room_tabletop\n state: 'on'\n - condition: state\n entity_id: sensor.weather\n state: night\n sequence:\n - action: script.dining_room_dnd\n - conditions:\n - condition: state\n entity_id: media_player.dining_room_tabletop\n state: 'on'\n sequence:\n - action: script.dining_room_game_setup\n - conditions:\n - condition: trigger\n id: tabletop\n sequence:\n - action: script.dining_room_game_over", "config": [ { "name": "weather sensor", "room": "outdoor", "type": "sensor", "id": { "entity_id": "sensor.weather", "device_id": null } }, { "name": "dining room tabletop media player", "room": "dining_room", "type": "media_player", "id": { "entity_id": "media_player.dining_room_tabletop", "device_id": null } }, { "name": "dining room dnd script", "room": "dining_room", "type": "script", "id": { "entity_id": "script.dining_room_dnd", "device_id": null } }, { "name": "dining room game setup script", "room": "dining_room", "type": "script", "id": { "entity_id": "script.dining_room_game_setup", "device_id": null } }, { "name": "dining room game over script", "room": "dining_room", "type": "script", "id": { "entity_id": "script.dining_room_game_over", "device_id": null } }, { "name": "dining room media player", "room": "dining_room", "type": "media_player", "id": { "entity_id": "media_player.dining_room", "device_id": null } } ] }, { "id": "door_opened_notification", "automation": "- alias: Door Opened Notification\n id: door_opened_notification\n description: 'Notify when a door is opened while nobody is home.\n\n '\n mode: single\n triggers:\n - trigger: state\n entity_id: binary_sensor.doors_opened_while_not_occupied\n to: 'on'\n actions:\n - action: notify.mobile_app_scottys_iphone\n data:\n title: Door Opened\n message: '{% set door = state_attr(''binary_sensor.doors_opened_while_not_occupied'',\n ''door'') %}\n\n {{ state_attr(door, ''friendly_name'') | default(door) }}\n\n '", "config": [ { "name": "doors opened while not occupied sensor", "room": "entrance", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.doors_opened_while_not_occupied", "device_id": null } }, { "name": "mobile app scottys iphone notify", "room": null, "type": "notify", "id": { "entity_id": "notify.mobile_app_scottys_iphone", "device_id": null } } ] }, { "id": "gaming_power_limit", "automation": "- alias: Gaming Power Limit\n id: gaming_power_limit\n description: 'Limit \"Vecna\" GPU power, and reduce home power consumption, while\n both gaming PCs are on.\n\n '\n mode: queued\n triggers:\n - trigger: state\n entity_id: binary_sensor.gaming_power_limit\n to:\n - 'on'\n - 'off'\n - trigger: state\n entity_id: sensor.vecna_lastsystemstatechange\n to: null\n actions:\n - if:\n - condition: state\n entity_id: binary_sensor.gaming_power_limit\n state: 'on'\n then:\n - action: button.press\n target:\n entity_id: button.vecna_power_limit_enable\n - action: switch.turn_off\n target:\n entity_id:\n - switch.office_wall_desk_right_switch_top\n - switch.loft_wall_south_switch_top\n else:\n - action: button.press\n target:\n entity_id: button.vecna_power_limit_disable\n - action: switch.turn_on\n target:\n entity_id:\n - switch.office_wall_desk_right_switch_top\n - switch.loft_wall_south_switch_top", "config": [ { "name": "gaming power limit sensor", "room": "office", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.gaming_power_limit", "device_id": null } }, { "name": "vecna lastsystemstatechange sensor", "room": "office", "type": "sensor", "id": { "entity_id": "sensor.vecna_lastsystemstatechange", "device_id": null } }, { "name": "vecna power limit enable button", "room": "office", "type": "button", "id": { "entity_id": "button.vecna_power_limit_enable", "device_id": null } }, { "name": "office wall desk right switch top", "room": "office", "type": "switch", "id": { "entity_id": "switch.office_wall_desk_right_switch_top", "device_id": null } }, { "name": "loft wall south switch top", "room": "loft", "type": "switch", "id": { "entity_id": "switch.loft_wall_south_switch_top", "device_id": null } }, { "name": "vecna power limit disable button", "room": "office", "type": "button", "id": { "entity_id": "button.vecna_power_limit_disable", "device_id": null } } ] }, { "id": "home_off", "automation": "- alias: Home Off\n id: home_off\n description: 'Turn things off when the last person goes to sleep, or the home is\n no longer occupied.\n\n '\n mode: single\n triggers:\n - trigger: state\n entity_id: binary_sensor.anyone_home\n to: 'off'\n - trigger: state\n entity_id: binary_sensor.anyone_asleep\n to: 'on'\n actions:\n - action: light.turn_off\n continue_on_error: true\n target:\n area_id:\n - kitchen\n - downstairs_bathroom\n - bathroom\n - stairs\n - roof\n entity_id:\n - light.dining_room_chandelier\n - light.dining_room_spots\n - light.bedroom_left_closet\n - light.bedroom_right_closet\n - action: media_player.media_pause\n continue_on_error: true\n target:\n entity_id:\n - media_player.dining_room\n - media_player.kitchen\n - media_player.office\n - media_player.bedroom\n - media_player.loft\n - media_player.bathroom\n - media_player.downstairs_bathroom\n - action: media_player.turn_off\n continue_on_error: true\n target:\n entity_id:\n - media_player.loft_tv", "config": [ { "name": "anyone asleep sensor", "room": "bedroom", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.anyone_asleep", "device_id": null } }, { "name": "loft tv media player", "room": "loft", "type": "media_player", "id": { "entity_id": "media_player.loft_tv", "device_id": null } }, { "name": "anyone home sensor", "room": "home", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.anyone_home", "device_id": null } }, { "name": "dining room chandelier light", "room": "dining_room", "type": "light", "id": { "entity_id": "light.dining_room_chandelier", "device_id": null } }, { "name": "dining room spots light", "room": "dining_room", "type": "light", "id": { "entity_id": "light.dining_room_spots", "device_id": null } }, { "name": "bedroom left closet light", "room": "bedroom", "type": "light", "id": { "entity_id": "light.bedroom_left_closet", "device_id": null } }, { "name": "bedroom right closet light", "room": "bedroom", "type": "light", "id": { "entity_id": "light.bedroom_right_closet", "device_id": null } }, { "name": "dining room media player", "room": "dining_room", "type": "media_player", "id": { "entity_id": "media_player.dining_room", "device_id": null } }, { "name": "kitchen media player", "room": "kitchen", "type": "media_player", "id": { "entity_id": "media_player.kitchen", "device_id": null } }, { "name": "office media player", "room": "office", "type": "media_player", "id": { "entity_id": "media_player.office", "device_id": null } }, { "name": "bedroom media player", "room": "bedroom", "type": "media_player", "id": { "entity_id": "media_player.bedroom", "device_id": null } }, { "name": "loft media player", "room": "loft", "type": "media_player", "id": { "entity_id": "media_player.loft", "device_id": null } }, { "name": "bathroom media player", "room": "bathroom", "type": "media_player", "id": { "entity_id": "media_player.bathroom", "device_id": null } }, { "name": "downstairs bathroom media player", "room": "downstairs_bathroom", "type": "media_player", "id": { "entity_id": "media_player.downstairs_bathroom", "device_id": null } } ] }, { "id": "kitchen_blinds", "automation": "- alias: Kitchen Blinds\n id: kitchen_blinds\n description: 'Open and close the kitchen window blinds based on the time of day,\n sun position, and weather.\n\n '\n mode: queued\n triggers:\n - trigger: numeric_state\n entity_id: sun.sun\n attribute: azimuth\n above: 115\n - trigger: numeric_state\n entity_id: sun.sun\n attribute: azimuth\n above: 235\n - trigger: state\n entity_id: sensor.weather\n not_to: unavailable\n - trigger: state\n entity_id: media_player.loft_tv\n to:\n - 'on'\n - 'off'\n - trigger: state\n entity_id: input_boolean.dining_room_play\n to:\n - 'on'\n - 'off'\n - trigger: state\n entity_id: input_boolean.loft_play\n to:\n - 'on'\n - 'off'\n actions:\n - choose:\n - conditions:\n - condition: numeric_state\n entity_id: sun.sun\n attribute: azimuth\n above: 115\n below: 235\n - condition: state\n entity_id: sensor.weather\n state: hot-day\n sequence:\n - action: scene.turn_on\n target:\n entity_id: scene.kitchen_sun\n - conditions:\n - condition: state\n entity_id: input_boolean.dining_room_play\n state: 'on'\n sequence:\n - action: scene.turn_on\n target:\n entity_id: scene.kitchen_sun\n - conditions:\n - not:\n - condition: state\n entity_id: sensor.weather\n state: night\n - condition: state\n entity_id: media_player.loft_tv\n state: 'on'\n sequence:\n - action: scene.turn_on\n target:\n entity_id: scene.kitchen_nighttime\n - conditions:\n - condition: state\n entity_id: input_boolean.loft_play\n state: 'on'\n sequence:\n - action: scene.turn_on\n target:\n entity_id: scene.kitchen_nighttime\n - conditions:\n - not:\n - condition: state\n entity_id: sensor.weather\n state: night\n sequence:\n - action: scene.turn_on\n target:\n entity_id: scene.kitchen_daytime\n - conditions:\n - condition: state\n entity_id: sensor.weather\n state: night\n sequence:\n - action: scene.turn_on\n target:\n entity_id: scene.kitchen_nighttime", "config": [ { "name": "weather sensor", "room": "outdoor", "type": "sensor", "id": { "entity_id": "sensor.weather", "device_id": null } }, { "name": "sun sun sensor", "room": "outdoor", "type": "sensor", "id": { "entity_id": "sun.sun", "device_id": null } }, { "name": "loft tv media player", "room": "loft", "type": "media_player", "id": { "entity_id": "media_player.loft_tv", "device_id": null } }, { "name": "dining room play input boolean", "room": "dining_room", "type": "input_boolean", "id": { "entity_id": "input_boolean.dining_room_play", "device_id": null } }, { "name": "loft play input boolean", "room": "loft", "type": "input_boolean", "id": { "entity_id": "input_boolean.loft_play", "device_id": null } }, { "name": "loft media player", "room": "loft", "type": "media_player", "id": { "entity_id": "media_player.loft", "device_id": null } }, { "name": "kitchen sun scene", "room": "kitchen", "type": "scene", "id": { "entity_id": "scene.kitchen_sun", "device_id": null } }, { "name": "kitchen nighttime scene", "room": "kitchen", "type": "scene", "id": { "entity_id": "scene.kitchen_nighttime", "device_id": null } }, { "name": "kitchen daytime scene", "room": "kitchen", "type": "scene", "id": { "entity_id": "scene.kitchen_daytime", "device_id": null } } ] }, { "id": "kitchen_home_at_night", "automation": "- alias: Kitchen Home at Night\n id: kitchen_home_at_night\n description: 'Turns on the entrance lights when anyone comes home late at night.\n\n '\n mode: restart\n triggers:\n - trigger: state\n entity_id: binary_sensor.anyone_home\n to: 'on'\n not_from: unavailable\n - trigger: zone\n entity_id:\n - person.scotty\n zone: zone.home\n event: enter\n conditions:\n - condition: state\n entity_id: sensor.weather\n state: night\n actions:\n - action: light.turn_on\n target:\n entity_id: light.entrance\n - delay:\n minutes: 15\n - action: light.turn_off\n target:\n entity_id: light.entrance", "config": [ { "name": "Person Scotty", "room": null, "type": "person", "id": { "entity_id": "person.scotty", "device_id": null } }, { "name": "weather sensor", "room": "outdoor", "type": "sensor", "id": { "entity_id": "sensor.weather", "device_id": null } }, { "name": "anyone home sensor", "room": "home", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.anyone_home", "device_id": null } }, { "name": "entrance light", "room": "entrance", "type": "light", "id": { "entity_id": "light.entrance", "device_id": null } } ] }, { "id": "kitchen_lights", "automation": "- alias: Kitchen Lights\n id: kitchen_lights\n description: 'Turns on the kitchen counter lights for 15 minutes after motion is\n detected, or when anyone comes home at night.\n\n '\n mode: restart\n triggers:\n - trigger: state\n entity_id: binary_sensor.dining_room_motion_occupancy\n to: 'on'\n - trigger: state\n entity_id: binary_sensor.anyone_home\n to: 'on'\n not_from: unavailable\n - trigger: zone\n entity_id:\n - person.scotty\n zone: zone.home\n event: enter\n conditions:\n - condition: state\n entity_id: sensor.weather\n state:\n - night\n - cloudy-day\n - or:\n - condition: state\n entity_id: light.kitchen_counter\n state: 'off'\n - condition: state\n entity_id: automation.kitchen_lights\n attribute: current\n state: 1\n - condition: state\n entity_id: binary_sensor.anyone_home\n state: 'on'\n actions:\n - if:\n - condition: state\n entity_id: light.kitchen_counter\n state: 'off'\n then:\n - action: light.turn_on\n data:\n brightness_pct: 25\n target:\n entity_id: light.kitchen_counter\n - delay:\n seconds: 3\n - wait_for_trigger:\n - trigger: state\n entity_id: light.kitchen_counter\n timeout:\n minutes: 15\n - if:\n - '{{ not wait.completed }}'\n then:\n - action: light.turn_off\n target:\n entity_id: light.kitchen_counter", "config": [ { "name": "Person Scotty", "room": null, "type": "person", "id": { "entity_id": "person.scotty", "device_id": null } }, { "name": "weather sensor", "room": "outdoor", "type": "sensor", "id": { "entity_id": "sensor.weather", "device_id": null } }, { "name": "anyone home sensor", "room": "home", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.anyone_home", "device_id": null } }, { "name": "dining room motion occupancy sensor", "room": "dining_room", "type": "binary_sensor", "id": { "entity_id": "binary_sensor.dining_room_motion_occupancy", "device_id": null } }, { "name": "kitchen counter light", "room": "kitchen", "type": "light", "id": { "entity_id": "light.kitchen_counter", "device_id": null } }, { "name": "kitchen lights automation", "room": "kitchen", "type": "automation", "id": { "entity_id": "automation.kitchen_lights", "device_id": null } } ] }, { "id": "loft_play", "automation": "- alias: Loft Play\n id: loft_play\n description: 'Set scenes while playing in the Loft.\n\n '\n mode: queued\n triggers:\n - trigger: state\n entity_id: input_boolean.loft_play\n to:\n - 'on'\n - 'off'\n actions:\n - choose:\n - conditions:\n - condition: state\n entity_id: input_boolean.loft_play\n state: 'on'\n sequence:\n - action: light.turn_on\n target:\n entity_id:\n - light.loft_balcony_left\n - light.loft_balcony_center\n - light.loft_balcony_right\n - light.loft_wall_left\n - light.loft_wall_center\n - light.loft_wall_right\n - light.loft_east_left\n - light.loft_east_right\n - light.loft_south_left\n - light.loft_south_right\n - delay:\n seconds: 3\n - action: scene.create\n data:\n scene_id: loft_play\n snapshot_entities:\n - light.loft_balcony_left\n - light.loft_balcony_center\n - light.loft_balcony_right\n - light.loft_wall_left\n - light.loft_wall_center\n - light.loft_wall_right\n - light.loft_east_left\n - light.loft_east_right\n - light.loft_south_left\n - light.loft_south_right\n - action: script.loft_play\n - conditions:\n - condition: state\n entity_id: input_boolean.loft_play\n state: 'off'\n sequence:\n - action: scene.turn_on\n target:\n entity_id: scene.loft_play\n - action: scene.delete\n target:\n entity_id: scene.loft_play", "config": [ { "name": "loft play input boolean", "room": "loft", "type": "input_boolean", "id": { "entity_id": "input_boolean.loft_play", "device_id": null } }, { "name": "loft balcony left light", "room": "loft", "type": "light", "id": { "entity_id": "light.loft_balcony_left", "device_id": null } }, { "name": "loft balcony center light", "room": "loft", "type": "light", "id": { "entity_id": "light.loft_balcony_center", "device_id": null } }, { "name": "loft balcony right light", "room": "loft", "type": "light", "id": { "entity_id": "light.loft_balcony_right", "device_id": null } }, { "name": "loft wall left light", "room": "loft", "type": "light", "id": { "entity_id": "light.loft_wall_left", "device_id": null } }, { "name": "loft wall center light", "room": "loft", "type": "light", "id": { "entity_id": "light.loft_wall_center", "device_id": null } }, { "name": "loft wall right light", "room": "loft", "type": "light", "id": { "entity_id": "light.loft_wall_right", "device_id": null } }, { "name": "loft east left light", "room": "loft", "type": "light", "id": { "entity_id": "light.loft_east_left", "device_id": null } }, { "name": "loft east right light", "room": "loft", "type": "light", "id": { "entity_id": "light.loft_east_right", "device_id": null } }, { "name": "loft south left light", "room": "loft", "type": "light", "id": { "entity_id": "light.loft_south_left", "device_id": null } }, { "name": "loft south right light", "room": "loft", "type": "light", "id": { "entity_id": "light.loft_south_right", "device_id": null } }, { "name": "loft play script", "room": "loft", "type": "script", "id": { "entity_id": "script.loft_play", "device_id": null } }, { "name": "loft play scene", "room": "loft", "type": "scene", "id": { "entity_id": "scene.loft_play", "device_id": null } }, { "name": "loft wall light", "room": "loft", "type": "light", "id": { "entity_id": "light.loft_wall", "device_id": null } } ] }, { "id": "loft_tv", "automation": "- alias: Loft TV\n id: loft_tv\n description: 'Turn loft ceiling lights off while the TV is on, and back on again\n when TV is turned off.\n\n '\n mode: queued\n triggers:\n - trigger: state\n entity_id: media_player.loft_tv\n to:\n - 'on'\n - 'off'\n actions:\n - choose:\n - conditions:\n - condition: state\n entity_id: media_player.loft_tv\n state: 'on'\n sequence:\n - action: light.turn_off\n target:\n entity_id: light.loft_ceiling\n - conditions:\n - condition: state\n entity_id: media_player.loft_tv\n state: 'off'\n - condition: state\n entity_id: light.loft_wall\n state: 'on'\n sequence:\n - action: light.turn_on\n target:\n entity_id: light.loft_ceiling", "config": [ { "name": "loft tv media player", "room": "loft", "type": "media_player", "id": { "entity_id": "media_player.loft_tv", "device_id": null } }, { "name": "loft media player", "room": "loft", "type": "media_player", "id": { "entity_id": "media_player.loft", "device_id": null } }, { "name": "loft ceiling light", "room": "loft", "type": "light", "id": { "entity_id": "light.loft_ceiling", "device_id": null } }, { "name": "loft wall light", "room": "loft", "type": "light", "id": { "entity_id": "light.loft_wall", "device_id": null } } ] } ]