- alias: Faux device tracker for twins id: alarm_device_tracker_for_twins trigger: - platform: state entity_id: input_boolean.girls_home_override to: null condition: condition: template value_template: '{{ trigger.to_state.state in [''off'', ''on''] }}' action: - service: device_tracker.see data_template: dev_id: faux_girls_home location_name: '{{ ''home'' if ''on'' == trigger.to_state.state else ''not_home'' }}' mode: single max_exceeded: silent - alias: Guests Present Reminder id: alarm_guests_present_reminder trigger: - platform: state entity_id: group.presence_home to: not_home condition: - condition: state entity_id: binary_sensor.guests_present state: 'on' actions: - service: notify.mobile_app_michaels_iphone data: message: 🛡️ Guests home, alarm not armed 🛡️ - alias: Reminder to disable guests present id: 2c36b0b2-3180-40e1-9cc8-f37660cf62e7 trigger: - platform: state entity_id: person.mike to: home conditions: - condition: state entity_id: binary_sensor.guests_present state: 'on' actions: - service: notify.mobile_app_michaels_iphone data: title: Guests Present Reminder message: Need to disable guests present? data: url: /dashboard-security/home clickAction: /dashboard-security/home - alias: Auto Arm and Disarm System id: alarm_arm_based_on_presence triggers: - platform: state entity_id: - group.presence_home not_to: - unavailable - unknown conditions: - condition: state entity_id: binary_sensor.guests_present state: 'off' - condition: state entity_id: device_tracker.faux_girls_home state: not_home actions: - service: calendar.get_events target: entity_id: calendar.house_planning data: duration: hours: 8 response_variable: cal - if: - condition: template value_template: '{{ cal[''calendar.house_planning''].events | selectattr(''summary'', ''contains'', ''Cleaners'') | list | length == 0 }}' then: - service: alarm_control_panel.alarm_{{ 'disarm' if 'home' == trigger.to_state.state else 'arm_away' }} target: entity_id: alarm_control_panel.master - if: - condition: template value_template: '{{ trigger.to_state.state == ''home'' }}' then: - service: select.select_option entity_id: select.my_ecobee_current_mode data: option: home mode: single max_exceeded: silent - alias: Auto Arm Alarm Night id: alarm_auto_arm_night_mode triggers: - platform: time at: 00:00:00 - platform: time at: 01:00:00 - platform: event event_type: goodnight_event conditions: - condition: state entity_id: - person.mike - person.tiff match: any state: home - condition: state entity_id: alarm_control_panel.master state: disarmed actions: - parallel: - service: light.turn_off target: floor_id: - basement - main_floor - service: cover.close_cover entity_id: cover.garage - service: lock.lock entity_id: - lock.locks - wait_template: '{{ is_state(''cover.garage'', ''closed'') }}' - service: homeassistant.turn_off entity_id: media_player.living_room_tv - wait_template: '{{ is_state(''binary_sensor.basement_presence'', ''off'') }}' - service: alarm_control_panel.alarm_arm_night target: entity_id: alarm_control_panel.master - alias: Disable Armed Night on iOS alarm wakeup id: alarm_disable_armed_night_ios_wakeup trigger: - platform: event event_type: ios_wakeup_event - platform: time at: 05:00:00 condition: - condition: state entity_id: alarm_control_panel.master state: armed_night action: - service: alarm_control_panel.alarm_disarm target: entity_id: alarm_control_panel.master - alias: Lock all doors when alarm armed id: alarm_lock_all_doors_armed trigger: - platform: state entity_id: alarm_control_panel.master to: - arming - armed_night - armed_vacation - armed_away action: - service: lock.lock entity_id: - lock.front_door - lock.side_door - alias: Alert armed state and garage open id: alarm_alert_garage_left_open trigger: - platform: state entity_id: alarm_control_panel.master to: - arming - armed_night - armed_vacation - armed_away condition: - condition: state entity_id: cover.garage state: open action: - service: camera.snapshot continue_on_error: true target: entity_id: camera.garage_low_resolution_channel data: filename: /media/garage/snapshot.jpg - service: notify.mobile_app_michaels_iphone data: message: 🚪 Garage Door Left Open 🚪 data: image: /media/local/garage/snapshot.jpg tag: alarmo-garage-open-alert actions: - action: CLOSE_GARAGE title: Close Garage activationMode: background authenticationRequired: true destructive: true behavior: default push: sound: name: default critical: 1 volume: 1.0 - alias: Turn on indoor lights when triggered at night id: alarm_lights_on_triggered_night trigger: - platform: state entity_id: alarm_control_panel.master from: armed_night to: triggered action: - service: light.turn_on target: floor_id: - basement - main_floor - alias: Turn off all indoor lights when armed id: alarm_turn_off_all_lights trigger: - platform: state entity_id: alarm_control_panel.master to: - armed_vacation - armed_away action: - service: light.turn_off target: floor_id: - basement - main_floor - top_floor - alias: Turn off lights at bedtime id: alarm_turn_off_lights_bedtime trigger: - platform: state entity_id: alarm_control_panel.master to: armed_night action: - service: light.turn_off target: floor_id: - basement - main_floor - alias: Set Switch Status LEDs id: alarm_set_switch_status_leds mode: queued max: 10 trigger: - platform: state entity_id: - lock.locks - cover.garage - binary_sensor.doors not_from: - unknown - unavailable not_to: - unknown - unavailable - opening - closing - platform: state entity_id: cover.garage to: closing id: closing - platform: state entity_id: cover.garage to: opening id: opening condition: - condition: state entity_id: group.adults state: home - condition: template value_template: '{{ has_value(''cover.garage'') and has_value(''lock.locks'') and has_value(''binary_sensor.doors'') }}' action: - choose: - conditions: - condition: trigger id: opening sequence: - service: script.blue_set_led data: color: '0' effect: fast_rising level: 40 duration: '15' entity_id: - light.front_hall - light.kitchen_light - light.back_deck_light - light.main_stairs - light.upstairs_hall - light.main_bath_light - light.basement_stairs - light.basement_hall - conditions: - condition: trigger id: closing sequence: - service: script.blue_set_led data: color: '0' effect: fast_falling level: 40 duration: '15' entity_id: - light.front_hall - light.kitchen_light - light.back_deck_light - light.main_stairs - light.upstairs_hall - light.main_bath_light - light.basement_stairs - light.basement_hall default: - variables: duration: "{% if is_state('binary_sensor.doors', 'off') and is_state('cover.garage',\ \ 'closed') and is_state('lock.locks', 'locked') %}\n 30\n{% else %}\n\ \ 255\n{% endif %}" color: "{# red 0, yellow 20, green 85 #} {% if is_state('cover.garage', 'closed')\ \ and is_state('binary_sensor.doors', 'off') and is_state('lock.locks',\ \ 'locked') %}\n 85\n{% elif is_state('binary_sensor.doors', 'off') and\ \ is_state('cover.garage', 'closed') and is_state('lock.locks', 'unlocked')\ \ %}\n 20\n{% else %}\n 0\n{% endif %}" - service: script.blue_set_led data: color: '{{ color }}' effect: solid level: 40 duration: '{{ duration }}' entity_id: - light.front_hall - light.kitchen_light - light.back_deck_light - light.main_stairs - light.upstairs_hall - light.main_bath_light - light.basement_stairs - light.basement_hall - alias: Notify Water Shutoff Jammed id: b08f5491-f6f0-4c03-b8a9-14c4a4b68ac5 triggers: - platform: state entity_id: binary_sensor.water_shutoff_valve_jammed to: 'on' actions: - service: notify.mobile_app_michaels_iphone data: message: 🚰 Water Shutoff Valve Jammed 🚰 data: tag: water-shutoff-valve-jammed push: sound: name: default critical: 1 volume: 1.0 - alias: Shut off water when leak detected and not home or overnight id: 7dad3c90-f96f-4976-878c-0ab3d1a6241a triggers: - platform: state entity_id: alarm_control_panel.water to: - triggered conditions: not: - condition: state entity_id: alarm_control_panel.master state: - disarmed actions: - service: valve.close_valve entity_id: valve.water_shutoff - alias: Alert on Alarm Trigger id: 3fa42dee-e85e-4787-8bdd-4d0db3dd7e59 triggers: - platform: state entity_id: alarm_control_panel.master to: - triggered actions: - choose: - conditions: - condition: template value_template: "{{ trigger.to_state is defined and\n trigger.to_state.attributes.open_sensors\ \ is defined and\n trigger.to_state.attributes.open_sensors.values()\n\ \ | select('ne', 'unavailable')\n | list\n | count == 0 }}\n" sequence: - service: notify.mobile_app_michaels_iphone data: message: 'Cause: {%- for k, v in (trigger.to_state.attributes.open_sensors or {}).items() %} {{ state_attr(k, ''friendly_name'') or k }}: {{ v }} {%- endfor %} ' title: 🚨 Alarmo Alert! 🚨 data: url: /dashboard-security/home clickAction: /dashboard-security/home default: - service: notify.mobile_app_michaels_iphone data: message: 'Cause: {%- for k, v in (trigger.to_state.attributes.open_sensors or {}).items() %} {{ state_attr(k, ''friendly_name'') or k }}: {{ ''wet'' if state_attr(k, ''device_class'') == ''moisture'' else v }} {%- endfor %} ' title: 🚨 Alarmo Alert! 🚨 data: push: sound: name: default critical: 1 url: /dashboard-security/home clickAction: /dashboard-security/home - alias: Water Softener Salt Bin Low id: appliances_water_softener_salt_bin_low trigger: - platform: numeric_state entity_id: sensor.salt_sensor_weight below: 9 for: hours: 24 action: - service: notify.mobile_app_michaels_iphone data: message: Water Softener Salt Low! {{ states('sensor.salt_sensor_weight') }}kg data: tag: water-softener-salt-low - id: '1688483068220' alias: Enable Tesla Wifi When Tag Scanned description: '' trigger: - platform: tag tag_id: e4c51def-84c8-4349-913d-9c711e814b37 condition: [] action: - service: homeassistant.turn_on data: {} target: entity_id: switch.tesla mode: single max_exceeded: silent - alias: Basement Light on pir entrance id: basement_light_on_pir_entrance triggers: - platform: state entity_id: binary_sensor.basement_stairs_motion_occupancy from: 'off' to: 'on' conditions: - condition: state entity_id: alarm_control_panel.master state: disarmed actions: - wait_for_trigger: - platform: state entity_id: binary_sensor.basement_hall_motion_occupancy to: 'on' - platform: state entity_id: sensor.basement_fp1_presence_event to: - enter - approach timeout: minutes: 5 continue_on_timeout: false - service: light.turn_on entity_id: light.basement_lights - alias: Basement Light Presence Control On id: basement_light_presence_controls_on mode: restart trigger: - platform: state entity_id: binary_sensor.basement_presence to: 'on' id: lights_on - platform: state entity_id: sensor.basement_fp1_presence_event to: - enter - approach id: lights_on - platform: state entity_id: binary_sensor.basement_presence to: 'off' id: timer_start - platform: event event_type: timer.finished event_data: entity_id: timer.basement_lights_off id: timer_lights_off action: choose: - conditions: - condition: trigger id: lights_on - condition: state entity_id: binary_sensor.workday_sensor state: 'on' - condition: state entity_id: input_boolean.nap_mode state: 'off' sequence: - service: timer.cancel target: entity_id: timer.basement_lights_off - if: - condition: state entity_id: light.basement_room_light_dimmer state: 'off' then: - service: light.turn_on entity_id: - light.basement_hall - light.basement_room_light_dimmer - conditions: - condition: trigger id: timer_start - condition: state entity_id: light.basement_lights state: 'on' sequence: - service: timer.start entity_id: timer.basement_lights_off - conditions: - condition: trigger id: timer_lights_off - condition: state entity_id: binary_sensor.basement_presence state: 'off' sequence: - service: light.turn_off entity_id: - light.basement_lights - alias: Sync Basement Hall Light to Basement Room Light id: basement_sync_hall_room_lights trigger: - platform: state to: null entity_id: light.basement_hall condition: - condition: state entity_id: alarm_control_panel.master state: disarmed - condition: template value_template: '{{ trigger.to_state.state in [''off'', ''on''] }}' action: - service: homeassistant.turn_{{ trigger.to_state.state }} entity_id: light.basement_room_light_dimmer - alias: Basement Lights off Night id: basement_night_auto_off trigger: - platform: time at: '23:00:00' action: service: homeassistant.turn_off entity_id: - light.basement_room_light_dimmer - light.basement_hall - alias: Top of basement stairs action control id: basement_top_of_stairs_action_control trigger: - trigger: device domain: mqtt device_id: db7cbb2e9f9508cfb87c54e915766ff3 type: action subtype: up_double id: turn_on - trigger: device domain: mqtt device_id: db7cbb2e9f9508cfb87c54e915766ff3 type: action subtype: down_double id: turn_off - trigger: device domain: mqtt device_id: 2dfe60ede49072748ae1109333546706 type: action subtype: up_double id: turn_on - trigger: device domain: mqtt device_id: 2dfe60ede49072748ae1109333546706 type: action subtype: down_double id: turn_off - trigger: device domain: mqtt device_id: 4fd03b2b6cc39b1cc034f88e88f749d6 type: action subtype: up_double id: turn_on - trigger: device domain: mqtt device_id: 4fd03b2b6cc39b1cc034f88e88f749d6 type: action subtype: down_double id: turn_off action: - choose: - conditions: - condition: trigger id: turn_on sequence: - service: light.turn_on target: area_id: basement - conditions: - condition: trigger id: turn_off sequence: - service: light.turn_off target: floor_id: basement - service: switch.turn_off entity_id: switch.basement_space_heater - alias: Basement Space Heater Control id: basement_space_heater_control triggers: - platform: state entity_id: binary_sensor.basement_presence to: 'on' id: turn_on - platform: state entity_id: binary_sensor.basement_presence to: 'off' id: turn_off for: minutes: 5 - platform: template value_template: '{{ ''armed_'' in states(''alarm_control_panel.master'') }}' id: turn_off condition: - condition: state entity_id: sensor.season state: winter actions: - choose: - conditions: - condition: trigger id: turn_on - condition: state entity_id: alarm_control_panel.master state: disarmed - condition: state entity_id: binary_sensor.home_grid_status state: 'on' sequence: - service: switch.turn_on entity_id: switch.basement_space_heater - conditions: - condition: trigger id: turn_off sequence: - service: switch.turn_off entity_id: switch.basement_space_heater - alias: Basement Stairs Light Motion Control id: basement_stairs_light_motion_control triggers: - platform: state entity_id: binary_sensor.basement_stairs_motion_occupancy from: 'off' to: 'on' id: turn_on - platform: state entity_id: binary_sensor.basement_stairs_motion_occupancy to: 'off' for: minutes: 10 id: turn_off actions: - choose: - conditions: - condition: state entity_id: group.adults state: home - condition: state entity_id: alarm_control_panel.master state: disarmed - condition: trigger id: turn_on - condition: time after: 07:45:00 sequence: - service: light.turn_on entity_id: light.basement_stairs default: - service: light.turn_off entity_id: light.basement_stairs - alias: Battery Low Notification id: batteries_change_battery_notification description: Battery Low Notification with auto dismiss trigger: - platform: event event_type: battery_notes_battery_threshold event_data: battery_low: true id: low alias: Battery went low - platform: event event_type: battery_notes_battery_threshold event_data: battery_low: false id: high alias: Battery went high action: - choose: - conditions: - condition: trigger id: - low sequence: - service: persistent_notification.create data: title: '{{ trigger.event.data.device_name }} Battery Low ' notification_id: '{{ trigger.event.data.device_id }}-{{ trigger.event.data.source_entity_id }}' message: 'The device has a battery level of {{ trigger.event.data.battery_level }}% {{ ''\n'' -}} You need {{ trigger.event.data.battery_quantity }}x {{ trigger.event.data.battery_type }} ' - conditions: - condition: trigger id: - high sequence: - service: persistent_notification.dismiss data: notification_id: '{{ trigger.event.data.device_id }}-{{ trigger.event.data.source_entity_id }}' mode: queued - alias: Bedroom Comfort when arrival past bedtime id: bedroom_comfort_arrive_past_bedtime trigger: platform: state entity_id: group.adults from: not_home to: home condition: - condition: time after: '22:00:00' before: 07:00:00 action: service: homeassistant.turn_on entity_id: - switch.master_white_noise - switch.master_humidifier - alias: Bedroom Humidifier On Early Evenings id: bedroom_comfort_early_evenings trigger: - platform: time at: '21:30:00' condition: - condition: state entity_id: group.adults state: home action: service: homeassistant.turn_on entity_id: - switch.master_humidifier - alias: Bedroom Comfort On Evenings id: bedroom_comfort_evenings trigger: - platform: time at: '22:30:00' condition: - condition: state entity_id: group.adults state: home action: service: homeassistant.turn_on entity_id: - switch.master_white_noise - switch.master_humidifier - alias: Bedroom Comfort if in bed id: bedroom_comfort_if_in_bed_early trigger: - platform: state entity_id: sensor.tiffanys_iphone_battery_state from: Not Charging to: Charging - platform: state entity_id: sensor.tiffanys_iphone_battery_state from: Not Charging to: Full - platform: time at: '22:45:00' condition: - condition: time after: '22:00:00' - condition: state entity_id: group.adults state: home action: service: homeassistant.turn_on entity_id: - switch.master_white_noise - switch.master_humidifier - alias: Bedroom off mornings id: bedroom_off_mornings_nursery_active trigger: - platform: state entity_id: - binary_sensor.bedroom_ecobee_motion - binary_sensor.bedroom_ecobee_occupancy - light.main_bath_light to: 'on' - platform: time at: 07:30:00 - platform: state entity_id: - switch.master_white_noise to: 'off' condition: - condition: state entity_id: input_boolean.sleeping_in state: 'off' - condition: state entity_id: input_boolean.nap_mode state: 'off' - condition: time after: 07:00:00 - condition: time before: 08:00:00 action: service: homeassistant.turn_off entity_id: - switch.master_white_noise - switch.master_humidifier - alias: Spare Bedroom Fan Toggle id: spare_bedroom_fan_toggle trigger: - platform: event event_type: ios_bedtime_event condition: - condition: state entity_id: person.mike state: home action: service: homeassistant.turn_on entity_id: - switch.spare_bedroom_fan - alias: Reset Sleeping in id: bedroom_reset_sleeping_in trigger: - platform: time at: '12:00:00' condition: - condition: state entity_id: input_boolean.sleeping_in state: 'on' action: service: homeassistant.turn_off entity_id: input_boolean.sleeping_in - alias: Front Bedroom Morning Wake Up Sequence id: bedroom_morning_wake_up_sequence trigger: - platform: event event_type: ios_wakeup_event action: - service: homeassistant.turn_off entity_id: - switch.spare_bedroom_fan - alias: Exterior Christmas Lights On id: xmas_exteior_lights_on triggers: - platform: numeric_state entity_id: sun.sun attribute: elevation below: 0.25 conditions: - condition: template value_template: '{{ now().month in [11, 12, 1, 2] }}' actions: service: homeassistant.turn_on entity_id: light.exterior_christmas_lights - alias: Exterior Christmas Lights Off id: xmas_exterior_lights_off triggers: - platform: time at: '23:30:00' - platform: sun event: sunrise actions: service: homeassistant.turn_off entity_id: light.exterior_christmas_lights - alias: Christmas Tree lights on when living room occupied id: xmas_lights_room_occupied triggers: - platform: state entity_id: binary_sensor.living_room_occupancy to: 'on' id: turn_on - platform: state entity_id: binary_sensor.living_room_occupancy to: 'off' for: minutes: 30 id: turn_off - platform: event event_type: ios_wakeup_event id: turn_on - platform: zone entity_id: - person.mike - person.tiff zone: zone.home event: enter id: turn_on - platform: state entity_id: alarm_control_panel.master to: - armed_night - armed_vacation - armed_away id: turn_off condition: - condition: template value_template: '{{ now().month in [11, 12, 1, 2] }}' - condition: time after: 06:00:00 before: '22:30:00' - condition: state entity_id: alarm_control_panel.master state: disarmed actions: choose: - conditions: - condition: trigger id: turn_on sequence: - service: homeassistant.turn_on entity_id: light.christmas_tree - conditions: - condition: trigger id: turn_off sequence: - service: homeassistant.turn_off entity_id: light.christmas_tree - alias: Christmas Tree off at bedtime id: xmas_tree_lights_off_night triggers: platform: time at: '22:30:00' actions: service: homeassistant.turn_off entity_id: light.christmas_tree - alias: Exterior Christmas Lights on arriving home id: external_xmas_lights_on_arrive_home triggers: - platform: zone entity_id: - person.mike - person.tiff zone: zone.home event: enter condition: - condition: template value_template: '{{ now().month in [11, 12, 1, 2] }}' - condition: numeric_state entity_id: sun.sun attribute: elevation below: 3.35 - condition: time after: '15:30:00' actions: service: homeassistant.turn_on entity_id: light.exterior_christmas_lights - alias: Disable Climate If Door or Window Ajar id: disable_climate_door_ajar trigger: - platform: state id: notification_door_open entity_id: - binary_sensor.doors - binary_sensor.windows to: 'on' for: minutes: 5 condition: - not: - condition: state entity_id: climate.my_ecobee state: 'off' action: - variables: climate_restore_state: '{{ states(''climate.my_ecobee'') }}' - service: notify.adults data: title: A Door or window has been left open message: Disabling thermostat data: tag: front-door-open-warning push: name: default critical: 1 - service: climate.turn_off target: entity_id: climate.my_ecobee - wait_for_trigger: - platform: template value_template: '{{ is_state(''binary_sensor.doors'', ''off'') and is_state(''binary_sensor.windows'', ''off'') }} ' - service: climate.set_hvac_mode target: entity_id: climate.my_ecobee data: hvac_mode: '{{ climate_restore_state }}' - service: notify.adults data: message: clear_notification data: tag: front-door-open-warning - alias: Furnace on if left off and cold forecast id: furnace_on_if_left_off_cold_forecast trigger: - platform: time at: '22:00:00' - platform: time at: 00:00:00 condition: - condition: state entity_id: climate.my_ecobee state: - 'off' action: - service: weather.get_forecasts target: entity_id: weather.tomorrow_io_home_nowcast data: type: hourly response_variable: forecast - condition: template value_template: '{{ forecast[''weather.tomorrow_io_home_nowcast''].forecast | map(attribute=''temperature'')| list | min < 10 }}' - service: notify.mobile_app_michaels_iphone data: message: Furnace enabled, cold weather forecast data: tag: furnace-enabled-cold-notification group: furnace-notification - service: climate.set_hvac_mode data: hvac_mode: heat target: entity_id: climate.my_ecobee - alias: CO2 High Notification id: comfort_co2_high_notification trigger: - platform: numeric_state entity_id: sensor.airthings_wave_111512_carbon_dioxide above: 950 for: hours: 1 condition: - condition: state entity_id: group.adults state: home action: - service: notify.mobile_app_michaels_iphone data: message: CO2 is high, is HRV on? data: url: /lovelace/air-quality clickAction: /lovelace/air-quality tag: comfort-co2-high-notification - alias: Set Doorbell Chime State id: doorbell_set_doorbell_chime_state mode: single max_exceeded: silent triggers: - platform: state entity_id: - input_boolean.nap_mode - input_boolean.quite_mode - switch.master_white_noise - schedule.doorbell_do_not_distrub not_to: - unavailable - unknown actions: - choose: - conditions: - condition: state entity_id: - input_boolean.nap_mode - input_boolean.quite_mode - switch.master_white_noise - schedule.doorbell_do_not_distrub state: 'off' sequence: - service: select.select_option target: entity_id: select.front_door_chime_type data: option: Mechanical - delay: seconds: 10 - wait_template: '{{ is_state(''select.front_door_chime_type'', ''Mechanical'') }}' timeout: minutes: 10 - if: - '{{ not wait.completed }}' then: - service: select.select_option target: entity_id: select.front_door_chime_type data: option: Mechanical - service: notify.mobile_app_michaels_iphone data: message: Check Doorbell Mechanical State default: - service: select.select_option target: entity_id: select.front_door_chime_type data: option: None - alias: Doorbell notification Message id: doorbell_notification_message mode: single max_exceeded: silent triggers: platform: state entity_id: binary_sensor.front_door_doorbell from: 'off' to: 'on' actions: - service: camera.snapshot continue_on_error: true target: entity_id: camera.front_door_low_resolution_channel data: filename: /media/doorbell/snapshot.jpg - service: notify.adults data: title: Ding Dong message: Someone is at the front door data: url: /dashboard-doorbell/doorbell clickAction: dashboard-doorbell/doorbell image: /media/local/doorbell/snapshot.jpg tag: doorbell-notification group: doorbell-group actions: - action: NOT_INTERESTED title: Not interested activationMode: background authenticationRequired: true destructive: true behavior: default - alias: Not Interested Message id: doorbell_not_interested_message triggers: - platform: event event_type: mobile_app_notification_action event_data: action: NOT_INTERESTED - trigger: state entity_id: input_button.sorry_not_interested actions: - service: tts.cloud_say data: entity_id: media_player.front_door_speaker message: Sorry, not interested cache: true - delay: seconds: 1 - action: text.set_value target: entity_id: text.front_door_doorbell data: value: Not interested - delay: seconds: 15 - action: automation.trigger data: skip_condition: true target: entity_id: automation.set_doorbell_message - alias: Doorbell activated id: doorbell_activated mode: single max_exceeded: silent triggers: - platform: state entity_id: binary_sensor.front_door_doorbell from: 'off' to: 'on' conditions: - condition: state entity_id: group.adults state: home - condition: state entity_id: alarm_control_panel.master state: disarmed actions: - parallel: - service: media_player.media_pause entity_id: media_player.living_room_tv - choose: - conditions: - condition: template value_template: '{{ now().month == 10 and now().day == 31 and now().hour > 17 }}' - condition: state entity_id: input_boolean.nap_mode state: 'off' sequence: - service: script.sonos_say data: entity_id: - media_player.sonos_living_room message: Trick or treat! volume: 25 default: - service: script.sonos_say data: entity_id: - media_player.sonos_basement - media_player.sonos_living_room message: Someone is at the door volume: 30 - service: script.blue_set_led data: color: '150' effect: fast_blink level: 70 duration: 60 entity_id: - light.front_hall - light.living_room_light - light.back_deck_light - light.main_stairs - light.upstairs_hall - light.main_bath_light - light.basement_stairs - delay: seconds: 30 - alias: Halloween Doorbell Audio id: doorbell_halloween_audio_message mode: single max_exceeded: silent triggers: - platform: state entity_id: binary_sensor.front_door_doorbell from: 'off' to: 'on' conditions: - condition: time after: '16:00:00' before: '21:00:00' - condition: template value_template: '{{ now().month == 10 and now().day == 31 }}' - condition: numeric_state entity_id: sensor.home_nearest_distance below: 500 actions: - service: tts.cloud_say data: entity_id: media_player.front_door_speaker message: Boo! Happy Halloween! cache: true - delay: seconds: 60 - alias: Doorbell package detected id: doorbell_package_detected triggers: - platform: state entity_id: binary_sensor.front_door_package_detected to: 'on' actions: - service: camera.snapshot target: entity_id: camera.front_door_package_camera data: filename: /media/doorbell/package.jpg - service: notify.adults data: title: Package Detected message: Check the front porch data: image: /media/local/doorbell/package.jpg tag: doorbell-package-notification group: doorbell-package - alias: Set doorbell message id: doorbell_set_message max_exceeded: silent triggers: - platform: state entity_id: - switch.nap_mode - input_boolean.quite_mode - switch.master_white_noise - schedule.doorbell_do_not_distrub to: - 'on' - 'off' - platform: time at: '17:00:00' actions: - choose: - conditions: - condition: template value_template: '{{ now().month == 10 and now().day == 31 }}' - condition: numeric_state entity_id: sensor.home_nearest_distance below: 500 - condition: time after: '17:00:00' before: '21:00:00' sequence: - service: text.set_value target: entity_id: text.front_door_doorbell data: value: Trick or Treat! - conditions: - condition: state entity_id: - switch.nap_mode - input_boolean.quite_mode - switch.master_white_noise - schedule.doorbell_do_not_distrub match: any state: 'on' sequence: - service: select.select_option data: option: DO NOT DISTURB target: entity_id: select.front_door_doorbell_text default: - service: select.select_option data: option: Default Message (WELCOME) target: entity_id: select.front_door_doorbell_text - alias: Set doorbell chime on shutdown id: 080e0639-daa4-4632-adcf-fd4be3b42f4c triggers: - platform: homeassistant event: shutdown conditions: - condition: state entity_id: input_boolean.nap_mode state: 'off' - condition: state entity_id: input_boolean.quite_mode state: 'off' - condition: state entity_id: switch.master_white_noise state: 'off' - condition: state entity_id: schedule.doorbell_do_not_distrub state: 'off' actions: - service: select.select_option target: entity_id: select.front_door_chime_type data: option: Mechanical - alias: Save media power when not home id: media_energy_saver_not_home trigger: - platform: state entity_id: alarm_control_panel.master to: - armed_night - armed_vacation id: power_off - platform: state entity_id: sensor.current_hydro_time_of_use_state to: - Mid Peak - On Peak from: - Off Peak id: power_off - platform: state entity_id: alarm_control_panel.master to: - armed_away for: minutes: 30 id: power_off - platform: state entity_id: alarm_control_panel.master to: disarmed not_from: triggered id: power_on - platform: state entity_id: sensor.current_hydro_time_of_use_state to: Off Peak id: power_on - platform: time at: '15:30:00' id: power_on - platform: state entity_id: schedule.tv_power to: 'on' id: power_on action: choose: - conditions: - condition: trigger id: power_off - not: - condition: state entity_id: media_player.apple_tv_living_room state: playing - condition: state entity_id: media_player.living_room_tv state: 'on' sequence: - service: homeassistant.turn_off entity_id: switch.entertainment_switch_relay - conditions: - condition: trigger id: power_on - condition: state entity_id: alarm_control_panel.master state: disarmed - or: - condition: state entity_id: schedule.tv_power state: 'on' - condition: state entity_id: calendar.ontario_holidays state: 'on' sequence: - service: homeassistant.turn_on entity_id: switch.entertainment_switch_relay - alias: Save powerwall on holidays id: energy_save_powerwall_on_holidays triggers: - platform: state entity_id: schedule.holiday_powerwall to: 'on' id: son - platform: state entity_id: schedule.holiday_powerwall to: 'off' conditions: - condition: state entity_id: calendar.ontario_holidays state: 'on' actions: - choose: - conditions: - condition: trigger id: son sequence: - service: number.set_value target: entity_id: number.home_backup_reserve data: value: 100 - service: notify.mobile_app_michaels_iphone data: message: Powerwall set for holidays data: tag: powerwall group: enery default: - service: number.set_value target: entity_id: number.home_backup_reserve data: value: 20 - service: notify.mobile_app_michaels_iphone data: message: Powerwall holidays off data: tag: powerwall group: enery - alias: Save power on grid outage id: energy_save_power_grid_outage triggers: - platform: state entity_id: binary_sensor.home_grid_status from: 'on' to: 'off' id: power_loss actions: - service: homeassistant.turn_off target: entity_id: - switch.basement_space_heater - alias: Garage Left Open Notification id: exterior_garage_left_open_notification trigger: - platform: state entity_id: cover.garage to: open id: garage_open - platform: state entity_id: cover.garage to: closed id: garage_closed - platform: event event_type: timer.finished event_data: entity_id: timer.garage_left_open id: timer_fired - platform: event event_type: mobile_app_notification_action event_data: action: ACK_GARAGE id: ack_garage - platform: event event_type: mobile_app_notification_action event_data: action: CLOSE_GARAGE id: close_garage action: choose: - conditions: - condition: trigger id: garage_open sequence: - service: timer.start entity_id: timer.garage_left_open - conditions: - condition: trigger id: timer_fired - condition: state entity_id: cover.garage state: open sequence: - wait_for_trigger: - platform: state entity_id: binary_sensor.garage_motion to: 'off' for: minutes: 10 - if: - '{{ not wait.completed }}' then: - service: timer.start entity_id: timer.garage_left_open - stop: Motion in garage not continuing - condition: state entity_id: cover.garage state: open - service: timer.start entity_id: timer.garage_left_open - service: notify.mobile_app_michaels_iphone data: message: Garage Door Left Open data: tag: garage-door-open-alert entity_id: camera.garage_low_resolution_channel actions: - action: CLOSE_GARAGE title: Close Garage activationMode: background authenticationRequired: true destructive: false behavior: default - action: ACK_GARAGE title: Acknowledge Garage activationMode: background authenticationRequired: true destructive: true behavior: default - conditions: - or: - condition: trigger id: ack_garage - condition: trigger id: garage_closed sequence: - service: timer.cancel entity_id: timer.garage_left_open - service: notify.mobile_app_michaels_iphone data: message: clear_notification data: tag: garage-door-open-alert - conditions: - condition: trigger id: close_garage sequence: - service: timer.cancel entity_id: timer.garage_left_open - service: cover.close_cover entity_id: cover.garage - alias: Exterior Lights on Evenings id: exterior_lights_on_evenings trigger: - platform: numeric_state entity_id: sun.sun attribute: elevation below: 0.25 - platform: state entity_id: binary_sensor.front_door_person_detected to: 'on' for: minutes: 2 condition: - condition: numeric_state entity_id: sun.sun attribute: elevation below: 0.25 action: service: light.turn_on entity_id: light.exterior_lights - alias: Keep Exterior Lights on Evenings id: exterior_keep_lights_on_evenings mode: single max_exceeded: silent trigger: - platform: state entity_id: - switch.front_porch - switch.side_door to: 'off' for: minutes: 2 condition: - not: - condition: template value_template: '{{ now().month == 10 and now().day == 31 and now().hour > 17 }}' - condition: numeric_state entity_id: sun.sun attribute: elevation below: 0.25 - condition: time after: '15:00:00' before: '23:30:00' action: service: light.turn_on entity_id: light.exterior_lights - alias: Exterior Lights off Night, or sunrise id: exterior_lights_off_overnight trigger: - platform: time at: '23:30:00' - platform: numeric_state entity_id: sun.sun attribute: elevation above: 0.25 action: - service: light.turn_off entity_id: light.exterior_lights - alias: Keep Exterior Lights off overnight if turned on outside normal hours id: exterior_lights_off_outside_normal_hours trigger: - platform: state entity_id: light.exterior_lights to: 'on' for: hours: 1 condition: - and: - condition: time after: '23:30:00' before: 06:00:00 - condition: numeric_state entity_id: sun.sun attribute: elevation below: 0.25 action: - wait_template: '{{ is_state("binary_sensor.front_door_person_detected", "off") }}' - service: light.turn_off entity_id: light.exterior_lights - alias: Keep Exterior Lights off during daylight id: exterior_lights_off_daylight trigger: - platform: state entity_id: light.exterior_lights to: 'on' for: minutes: 10 - platform: numeric_state entity_id: sun.sun attribute: elevation above: 0.25 condition: - condition: numeric_state entity_id: sun.sun attribute: elevation above: 0.25 action: - service: light.turn_off entity_id: light.exterior_lights - alias: Sync Exterior Lights id: exterior_sync_exterior_lights mode: single max_exceeded: silent trigger: - platform: state to: null entity_id: - light.front_porch - light.side_door condition: - condition: template value_template: '{{ trigger.to_state.state in ["off", "on"] }}' action: service: light.turn_{{ trigger.to_state.state }} entity_id: light.exterior_lights - alias: Turn on external lights, multiple triggers id: exterior_exterior_lights_on_triggers mode: single max_exceeded: silent trigger: - platform: state entity_id: cover.garage to: open - platform: state entity_id: lock.locks to: unlocked - platform: zone entity_id: - person.mike - person.tiff zone: zone.home event: enter - platform: state entity_id: binary_sensor.doors to: 'on' - platform: state entity_id: binary_sensor.front_door_doorbell from: 'off' to: 'on' condition: - condition: numeric_state entity_id: sun.sun attribute: elevation below: 0.25 action: - service: light.turn_on entity_id: light.exterior_lights - alias: Lock the side door when forgotten feeding the dog id: exterior_lock_side_door_dog trigger: - platform: state entity_id: lock.side_door to: unlocked for: minutes: 1 - platform: state entity_id: binary_sensor.side_door_open to: 'off' for: seconds: 15 condition: or: - condition: time after: 06:30:00 before: 08:00:00 - and: - condition: time after: '16:00:00' before: '17:00:00' - condition: state entity_id: binary_sensor.workday_sensor state: 'on' action: - wait_template: '{{ is_state(''binary_sensor.side_door_open'', ''off'') }}' - service: lock.lock entity_id: lock.side_door - alias: Garage below freezeing warning id: exterior_garage_below_freezing trigger: - platform: numeric_state entity_id: sensor.garage_temperature below: 2.0 action: - service: notify.mobile_app_michaels_iphone data: message: 🚨 Garage temperature low! 🚨 - alias: Unlock front door when arriving home and opening garage id: exterior_auto_unlock_front_door_if_garage_opened mode: single max_exceeded: silent trigger: - platform: zone entity_id: - person.mike - person.tiff zone: zone.home event: enter action: - wait_for_trigger: - platform: state entity_id: cover.garage to: open not_from: - unknown - unavailable timeout: minutes: 15 continue_on_timeout: false - service: lock.unlock entity_id: lock.front_door - alias: Lock Jammed Notification id: exterior_lock_jammed_notification mode: queued max: 5 max_exceeded: silent trigger: - platform: state entity_id: - binary_sensor.front_door_lock_jammed - binary_sensor.side_door_lock_jammed from: 'off' to: 'on' for: minutes: 5 actions: - service: notify.mobile_app_michaels_iphone data: title: 🔓 Lock Jammed 🔓 message: '{{ trigger.to_state.name }}' data: tag: exterior-lock-jammed - alias: Exiting Area with jammed lock id: exterior_area_with_jammed_lock triggers: - platform: state entity_id: - device_tracker.sparky_location - device_tracker.michaels_iphone - device_tracker.tiffanys_iphone to: away conditions: - condition: state entity_id: - binary_sensor.front_door_lock_jammed - binary_sensor.side_door_lock_jammed match: any state: 'on' actions: - service: notify.mobile_app_michaels_iphone data: title: 🔓 Lock Jammed 🔓 message: '{{ trigger.to_state.name }}' data: tag: exterior-lock-jammed push: sound: name: default critical: 1 volume: 1.0 - alias: Girls Bathroom Night Light Timer Control id: girls_bathroom_night_light_timer_control triggers: - platform: state entity_id: binary_sensor.bathroom_night_light_occupancy to: - 'on' - platform: state entity_id: binary_sensor.bathroom_night_light_occupancy to: - 'off' for: minutes: 5 - platform: state entity_id: binary_sensor.nursery_door to: 'off' for: minutes: 10 conditions: - condition: time after: '22:00:00' before: 06:00:00 - condition: state entity_id: input_boolean.nap_mode state: 'on' actions: - if: - condition: template value_template: '{{ trigger.to_state.state == ''off'' }}' then: - service: timer.start target: entity_id: timer.girls_bathroom_nightlight_off else: - service: timer.cancel target: entity_id: timer.girls_bathroom_nightlight_off - alias: Girls Bathroom Night Light id: girls_bathroom_night_light triggers: - platform: sun event: sunset id: turn_on - platform: numeric_state entity_id: sun.sun attribute: elevation below: 2.0 id: turn_on - platform: state entity_id: group.adults from: not_home to: home id: turn_on - platform: state entity_id: - binary_sensor.nursery_door - binary_sensor.bathroom_night_light_occupancy - input_boolean.nap_mode to: 'on' id: turn_on - platform: state entity_id: input_boolean.nap_mode to: 'on' id: turn_on - platform: numeric_state entity_id: sun.sun attribute: elevation above: 2.0 id: turn_off - platform: time at: '22:00:00' id: turn_off - platform: event event_type: timer.finished event_data: entity_id: timer.girls_bathroom_nightlight_off id: turn_off conditions: - not: - condition: state entity_id: alarm_control_panel.master state: - armed_vacation - armed_away actions: - choose: - conditions: - condition: numeric_state entity_id: sun.sun attribute: elevation below: 2.0 - condition: trigger id: turn_on sequence: - service: light.turn_on target: entity_id: light.bathroom_night_light data: brightness_pct: 20 rgb_color: - 255 - 164 - 8 - conditions: - condition: trigger id: turn_off sequence: - wait_template: '{{ is_state("binary_sensor.bathroom_night_light_occupancy", "off") }}' - service: light.turn_off target: entity_id: light.bathroom_night_light - alias: Faux Motion for Nursery Door Event id: homekit_faux_event_nursery trigger: - platform: state entity_id: binary_sensor.nursery_door to: 'on' condition: - condition: state entity_id: input_boolean.nap_mode state: 'on' for: minutes: 5 action: - event: homekit_faux_camera_event - alias: Lets Encrypt Cert Refresh id: infra_le_cert_refresh trigger: - platform: time at: 03:12:00 action: - service: hassio.addon_restart data: addon: core_letsencrypt - delay: minutes: 5 - service: hassio.addon_restart data: addon: core_nginx_proxy - alias: Clear Switch LED signals on start id: inovelli_clear_led_start trigger: - platform: homeassistant event: start action: - service: script.blue_set_led data: color: '255' effect: clear_effect level: 70 duration: 65 entity_id: "{{ states.light\n | map(attribute=\"entity_id\")\n | select('is_device_attr',\ \ 'model', '2-in-1 switch + dimmer (VZM31-SN)')\n | list}}\n" - alias: Update Complications On Specific State changes id: update_complications_state_changes triggers: - platform: state entity_id: - cover.garage - lock.front_door - lock.side_door - input_boolean.nap_mode to: null actions: - service: notify.mobile_app_michaels_iphone data: message: update_complications - alias: Pick up girls reminder id: pick_up_girls_reminder mode: single max_exceeded: silent trigger: - platform: zone entity_id: - device_tracker.michaels_iphone - device_tracker.tiffanys_iphone zone: zone.school event: enter id: enter_pickup_zone - platform: zone entity_id: - device_tracker.michaels_iphone - device_tracker.tiffanys_iphone zone: zone.camp event: enter id: enter_camp_zone - platform: time at: input_datetime.pickup_girls_reminder id: pickup_reminder condition: - condition: state entity_id: binary_sensor.workday_sensor state: 'on' - condition: time after: 06:00:00 before: '16:00:00' action: - choose: - conditions: - or: - and: - condition: trigger id: enter_pickup_zone - condition: template value_template: '{{ now().month >= 9 or now().month <= 6 }}' - condition: trigger id: enter_camp_zone sequence: if: - condition: trigger id: enter_camp_zone then: - service: input_datetime.set_datetime target: entity_id: input_datetime.pickup_girls_reminder data: date: '{{ now().strftime(''%Y-%m-%d'') }}' time: '{{ states(''input_datetime.camp_pickup_time'') }}' else: - service: input_datetime.set_datetime target: entity_id: input_datetime.pickup_girls_reminder data: date: '{{ now().strftime(''%Y-%m-%d'') }}' time: '15:45:00' - conditions: - condition: trigger id: pickup_reminder sequence: - service: notify.mobile_app_michaels_iphone data: title: Pickup Reminder message: Pickup the twins! data: tag: pickup-reminder group: pickup-notification push: sound: name: default critical: 1 volume: 0.5 - alias: Laundry Notification id: laundry_simple_laundry_notification mode: queued max: 5 max_exceeded: silent trigger: - platform: state entity_id: binary_sensor.washer_status from: 'on' to: 'off' id: notify_to_move - platform: event event_type: timer.finished event_data: entity_id: timer.laundry_done id: notify_to_move - platform: state entity_id: group.adults to: home for: minutes: 10 id: arrived_home - platform: event event_type: mobile_app_notification_action event_data: action: laundry_moved id: laundry_moved - platform: state entity_id: binary_sensor.dryer_status to: 'on' for: minutes: 5 id: laundry_moved - platform: state entity_id: binary_sensor.washer_status from: 'off' to: 'on' for: minutes: 15 id: laundry_moved action: - choose: - conditions: - condition: trigger id: notify_to_move sequence: - service: timer.start entity_id: timer.laundry_done - if: - condition: state entity_id: binary_sensor.washer_status state: 'on' then: - stop: Washer is running, likely moved. - service: notify.adults data: message: clear_notification data: tag: laundry-done-notification - repeat: for_each: '{{ states.person | selectattr(''state'', ''eq'', ''home'') | map(attribute=''attributes.notifier'') | list}} ' sequence: - service: '{{ repeat.item }}' data: title: Laundry is done! message: Laundry cycle complete data: tag: laundry-done-notification url: /dashboard-laundry/home clickAction: /dashboard-laundry/home group: laundry-notification-group actions: - action: laundry_moved title: Laundry Moved authenticationRequired: true destructive: true behavior: default - if: - condition: state entity_id: group.adults state: home then: - service: script.blue_set_led data: color: '255' effect: slow_chase level: 70 duration: 65 entity_id: - light.front_hall - light.living_room_light - light.back_deck_light - light.main_stairs - light.upstairs_hall - light.main_bath_light - light.basement_stairs - light.basement_room_light_dimmer - conditions: - condition: trigger id: laundry_moved sequence: parallel: - service: timer.cancel entity_id: timer.laundry_done - service: notify.adults data: message: clear_notification data: tag: laundry-done-notification - service: script.blue_set_led data: color: '255' effect: clear_effect level: 70 duration: 65 entity_id: - light.front_hall - light.living_room_light - light.back_deck_light - light.main_stairs - light.upstairs_hall - light.main_bath_light - light.basement_stairs - conditions: - condition: trigger id: arrived_home - condition: state entity_id: timer.laundry_done state: active sequence: - service: timer.finish entity_id: timer.laundry_done - alias: Turn living room lights on when dark id: living_room_lights_on_when_dark trigger: - platform: state entity_id: binary_sensor.living_room_occupancy to: 'on' condition: - condition: state entity_id: light.kitchen_island state: 'off' for: minutes: 15 - condition: numeric_state entity_id: sensor.living_room_motion_illuminance below: 20 - condition: state entity_id: group.adults state: home - condition: state entity_id: alarm_control_panel.master state: disarmed action: - service: light.turn_on entity_id: light.kitchen_island - alias: Front Hall Lock and Garage Control id: living_front_hall_lock_garage_control trigger: - trigger: device domain: mqtt device_id: 949dd8fd2c9e4403656fc84e75de9607 type: action subtype: up_triple id: lock_unlock - trigger: device domain: mqtt device_id: 949dd8fd2c9e4403656fc84e75de9607 type: action subtype: up_quadruple id: garage_up - trigger: device domain: mqtt device_id: 949dd8fd2c9e4403656fc84e75de9607 type: action subtype: down_triple id: lock_lock - trigger: device domain: mqtt device_id: 949dd8fd2c9e4403656fc84e75de9607 type: action subtype: down_quadruple id: garage_down action: - choose: - conditions: - condition: trigger id: lock_unlock sequence: - service: lock.unlock entity_id: lock.front_door - conditions: - condition: trigger id: lock_lock sequence: - service: lock.lock entity_id: lock.front_door - conditions: - condition: trigger id: garage_up sequence: - service: cover.open_cover entity_id: cover.garage - conditions: - condition: trigger id: garage_down sequence: - service: cover.close_cover entity_id: cover.garage - alias: Garage Control with Kitchen Switch id: living_garage_control_kitchen_switch trigger: - trigger: device domain: mqtt device_id: e97867a8181f2b6c5aef264706584f91 type: action subtype: up_triple id: garage_up_trigger - trigger: device domain: mqtt device_id: e97867a8181f2b6c5aef264706584f91 type: action subtype: down_triple id: garage_down_trigger action: - choose: - conditions: - condition: trigger id: garage_up_trigger sequence: - service: cover.open_cover entity_id: cover.garage - conditions: - condition: trigger id: garage_down_trigger sequence: - service: cover.close_cover entity_id: cover.garage - alias: Lock Control with Living Switch id: living_front_lock_control_living_switch trigger: - trigger: device domain: mqtt device_id: c2fce543d85f8ffccd89691a42f784d9 type: action subtype: up_triple id: garage_up_trigger - trigger: device domain: mqtt device_id: c2fce543d85f8ffccd89691a42f784d9 type: action subtype: down_triple id: garage_down_trigger action: - choose: - conditions: - condition: trigger id: door_unlock_trigger sequence: - service: lock.unlock entity_id: lock.front_door - conditions: - condition: trigger id: door_lock_trigger sequence: - service: lock.lock entity_id: lock.front_door - alias: Living room light group multitap control id: living_room_light_group_multitap_control mode: single max_exceeded: silent triggers: - trigger: device domain: mqtt device_id: c2fce543d85f8ffccd89691a42f784d9 type: action subtype: up_double id: turn_on - trigger: device domain: mqtt device_id: c2fce543d85f8ffccd89691a42f784d9 type: action subtype: down_double id: turn_off - trigger: device domain: mqtt device_id: e97867a8181f2b6c5aef264706584f91 type: action subtype: up_double id: turn_on - trigger: device domain: mqtt device_id: e97867a8181f2b6c5aef264706584f91 type: action subtype: down_double id: turn_off action: - choose: - conditions: - condition: trigger id: turn_on sequence: - service: light.turn_on entity_id: light.living_room_light_group - conditions: - condition: trigger id: turn_off sequence: - service: light.turn_off entity_id: light.living_room_light_group - alias: Turn on lights when arriving home id: living_room_turn_on_lights_arrival_dark trigger: - platform: state entity_id: group.adults to: home condition: - condition: numeric_state entity_id: sun.sun attribute: elevation below: 2.0 - condition: state entity_id: binary_sensor.guests_present state: 'off' action: - wait_for_trigger: - platform: state entity_id: binary_sensor.front_door to: 'on' timeout: minutes: 30 continue_on_timeout: false - parallel: - if: - not: - condition: state entity_id: media_player.apple_tv_living_room state: playing then: - service: light.turn_on entity_id: light.living_room_light_group - service: light.turn_on entity_id: light.front_hall - alias: Set Main floor Lights default local level id: main_floor_light_default_local_level mode: single max_exceeded: silent trigger: - platform: sun event: sunset variables: default_level: 80 - platform: state entity_id: input_boolean.nap_mode to: 'on' variables: default_level: 80 - platform: sun event: sunrise variables: default_level: 200 - platform: state entity_id: alarm_control_panel.master to: armed_night variables: default_level: 60 action: - service: script.blue_set_default_level data: default_level: '{{ default_level | default(100) }}' entity_id: - light.kitchen_light - light.living_room_light - light.front_hall - alias: Front door open turns on front hall light id: main_floor_front_door_turn_on_hall_light mode: single max_exceeded: silent triggers: - platform: state entity_id: binary_sensor.front_door to: 'on' conditions: - condition: numeric_state entity_id: sun.sun attribute: elevation below: 5.0 - condition: time before: '21:30:00' actions: - service: light.turn_on entity_id: light.front_hall - alias: Turn off front hall lights id: main_floor_front_hall_light_off_high_sun_elevation triggers: - platform: numeric_state entity_id: sun.sun attribute: elevation above: 10.0 actions: - service: light.turn_off entity_id: - light.front_hall - alias: Set Adaptive on Living Room Late Mornings id: cd72c85e-327a-4958-8e2b-fef856573302 trigger: - platform: time at: 09:30:00 condition: - condition: state entity_id: light.living_room_light_group state: 'on' action: - service: adaptive_lighting.apply data: entity_id: switch.adaptive_lighting_adapt_brightness_living_room transition: 90 - alias: Lock Status Change id: lock_status_change trigger: - platform: event event_type: zwave_js_notification event_data: command_class: 113 type: 6 event: 6 condition: - condition: state entity_id: person.mike state: not_home action: service: notify.mobile_app_michaels_iphone data: title: Lock Event message: '{% set user_slot = trigger.event.data.parameters.userId %} {% if user_slot == 1 %} {% set user = "Mike" %} {% elif user_slot == 2 %} {% set user = "Dad" %} {% elif user_slot == 3 %} {% set user = "Brendan" %} {% elif user_slot == 4 %} {% set user = "Tiff" %} {% elif user_slot == 5 %} {% set user = "Lisa" %} {% elif user_slot == 15 %} {% set user = "Cleaners" %} {% endif %} Unlocked{% if user is defined %} by {{user}}{% endif %} ' - alias: Secure House Evenings id: lock_secure_house_evenings trigger: - platform: time at: '22:30:00' - platform: state entity_id: - lock.locks to: unlocked for: minutes: 5 condition: condition: time after: '22:25:00' before: 07:00:00 action: - parallel: - sequence: - wait_template: '{{ is_state(''binary_sensor.front_door'', ''off'') }}' - service: lock.lock entity_id: lock.front_door - sequence: - wait_template: '{{ is_state(''binary_sensor.side_door_open'', ''off'') }}' - service: lock.lock entity_id: lock.side_door - alias: Enable Cleaners Lock Code id: lock_enable_cleaner_code mode: queued trigger: - platform: calendar event: start entity_id: calendar.house_planning offset: -03:00:00 id: set_lock - platform: calendar event: start entity_id: calendar.house_planning id: set_lock - platform: calendar event: end entity_id: calendar.house_planning id: clear_lock condition: - condition: template value_template: '{{ ''Cleaners'' in trigger.calendar_event.summary}}' action: choose: - conditions: - condition: trigger id: set_lock sequence: - service: zwave_js.set_lock_usercode data: code_slot: '15' usercode: secret cleaners_door_code entity_id: lock.front_door - service: notify.mobile_app_michaels_iphone data: message: Setting cleaners lock code data: tag: cleaners-code - service: alarm_control_panel.alarm_disarm target: entity_id: alarm_control_panel.master - conditions: - condition: trigger id: clear_lock sequence: - service: zwave_js.clear_lock_usercode data: code_slot: '15' entity_id: lock.front_door - service: notify.mobile_app_michaels_iphone data: message: Clearing cleaners lock code data: tag: cleaners-code - choose: - conditions: - condition: state entity_id: group.presence_home state: not_home sequence: - if: - condition: numeric_state entity_id: sensor.home_nearest_distance above: 55000 then: - service: alarm_control_panel.alarm_arm_vacation target: entity_id: alarm_control_panel.master else: - service: alarm_control_panel.alarm_arm_away target: entity_id: alarm_control_panel.master - alias: Lock doors when nearby but not on wifi id: lock_secure_house_nearby_but_offline trigger: - platform: state entity_id: - device_tracker.mikeiphone14_unifi - device_tracker.tiffanys_iphone_unifi to: not_home for: minutes: 10 condition: - condition: state entity_id: group.adults state: home - condition: state entity_id: - device_tracker.mikeiphone14_unifi - device_tracker.tiffanys_iphone_unifi state: not_home - condition: state entity_id: lock.locks state: unlocked action: - service: notify.mobile_app_michaels_iphone data: message: Wifi Auto Lock Triggered - service: lock.lock entity_id: lock.locks - alias: Set Main Bath Default Local Level for Light id: main_bath_set_default_local_level trigger: - platform: sun event: sunset variables: default_level: 60 - platform: sun event: sunrise variables: default_level: 254 - platform: state entity_id: alarm_control_panel.master to: armed_night variables: default_level: 20 action: - service: script.blue_set_default_level data: default_level: '{{ default_level | default(100) }}' entity_id: - light.main_bath_light - alias: Dim Main Bath Light for Shower id: main_bath_time_light_shower trigger: - platform: state entity_id: light.main_bath_light to: 'on' - platform: time at: '21:30:30' condition: - condition: state entity_id: light.main_bath_light state: 'on' - condition: time after: '21:30:00' action: - service: light.turn_on target: entity_id: light.main_bath_light data: brightness_pct: 3 transition: 10 - alias: Main Bath Full Brightness id: main_bath_full_brightness triggers: - trigger: device domain: mqtt device_id: e3bc901892c55fbcaa6dd42876632c35 type: action subtype: up_double actions: - service: light.turn_on target: entity_id: light.main_bath_light data: brightness_pct: 100 - alias: Main Bath Fan on for humidity id: main_bath_on_humidity triggers: - platform: numeric_state entity_id: sensor.bathroom_humidity_derivative above: 1 conditions: - condition: state entity_id: group.adults state: home actions: - action: notify.mobile_app_michaels_iphone data: message: Shower fan should run - id: monitoring_healthcheck alias: Healthchecks monitoring outbound call description: Send a ping to Healthcheck every minute mode: single trigger: platform: time_pattern minutes: /5 action: - service: rest_command.healthcheck - alias: Morning Wake Up Sequence id: mornings_wake_up_sequence mode: single max_exceeded: silent trigger: - platform: event event_type: ios_wakeup_event - platform: state entity_id: input_boolean.nap_mode to: 'off' - platform: state entity_id: binary_sensor.living_room_occupancy to: 'on' condition: - condition: state entity_id: group.adults state: home - condition: time after: 05:00:00 before: 09:00:00 - or: - condition: numeric_state entity_id: sun.sun attribute: elevation below: 3.0 - condition: numeric_state entity_id: sensor.tomorrow_io_home_cloud_cover above: 65 action: - service: homeassistant.turn_on entity_id: - light.kitchen_island - switch.christmas_tree - wait_template: '{{ is_state(''binary_sensor.living_room_occupancy'', ''on'') }}' timeout: hours: 1 continue_on_timeout: false - service: light.turn_on target: entity_id: - light.kitchen_light - light.living_room_light data: brightness_pct: 28 transition: 120 - alias: Nap Mode Button Toggle id: nursery_nap_mode_toggle mode: single max_exceeded: silent triggers: - trigger: device domain: mqtt device_id: 1cb9a601720330d677b308f3d186b9ff type: action subtype: single actions: - service: homeassistant.toggle entity_id: - input_boolean.nap_mode - delay: seconds: 1 - alias: Nursery LED On mode: single max_exceeded: silent id: nursery_led_on triggers: - trigger: device domain: mqtt device_id: 1ccea5c5991d06dc7b15dd83b69832e4 type: action subtype: 'on' actions: - service: homeassistant.turn_on entity_id: switch.nursery_power_loss_gate - wait_template: '{{ not is_state("light.nursery_led", "unavailable") }}' - choose: - conditions: - condition: state entity_id: input_boolean.nap_mode state: 'off' sequence: - service: script.led_strip_on data: scene_id: scene.nursery_led_on - conditions: - condition: state entity_id: input_boolean.nap_mode state: 'on' sequence: - service: script.led_strip_on data: scene_id: scene.nursery_led_on_low - alias: Nursery LED Off id: nursery_led_off triggers: - trigger: device domain: mqtt device_id: 1ccea5c5991d06dc7b15dd83b69832e4 type: action subtype: 'off' - platform: sun event: sunrise offset: +02:00:00 actions: - wait_template: '{{ not is_state("light.nursery_led", "unavailable") }}' - service: light.turn_off data: entity_id: - light.nursery_led - alias: Set Nap Accessories id: nursery_set_nap_accessories triggers: platform: state entity_id: input_boolean.nap_mode actions: - choose: - conditions: - condition: state entity_id: input_boolean.nap_mode state: 'on' sequence: - service: scene.turn_on entity_id: scene.baby_nap_on - service: media_player.volume_set data: volume_level: 0.15 entity_id: media_player.sonos_living_room - conditions: - condition: state entity_id: input_boolean.nap_mode state: 'off' sequence: - choose: - conditions: - condition: time after: '17:00:00' before: 08:30:00 sequence: - service: scene.turn_on entity_id: scene.baby_nap_off - service: script.led_strip_on data: scene_id: scene.nursery_led_on default: - service: scene.turn_on entity_id: scene.baby_nap_off - service: light.turn_on entity_id: light.nursery_light - alias: Nursery Humidifier on evenings id: nursery_humidifer_evenings triggers: - platform: state entity_id: input_boolean.nap_mode from: 'off' to: 'on' id: manual_on - platform: time at: '19:00:00' id: early_on conditions: or: - condition: trigger id: manual_on - and: - condition: trigger id: early_on - condition: state entity_id: group.adults state: home actions: - service: homeassistant.turn_on entity_id: fan.nursery_humidifier - alias: Girls Fan Control id: girls_fan_control triggers: - platform: state entity_id: input_boolean.nap_mode to: 'on' id: nap_on - platform: state entity_id: alarm_control_panel.master from: armed_vacation not_to: - unknown - unavailable - triggered variables: fan_speed_percentage: 33 - platform: numeric_state entity_id: sensor.girls_room_temperature above: 22.0 below: 25 variables: fan_speed_percentage: 33 - platform: numeric_state entity_id: sensor.girls_room_temperature above: 24.9 variables: fan_speed_percentage: 66 - platform: numeric_state entity_id: sun.sun attribute: azimuth above: 150 - platform: numeric_state entity_id: sensor.girls_room_temperature below: 22.5 id: force_off conditions: - not: - condition: state entity_id: sensor.season state: winter - condition: state entity_id: alarm_control_panel.master state: armed_vacation - condition: state entity_id: climate.my_ecobee state: heat - condition: time after: '11:00:00' actions: - choose: - conditions: - condition: trigger id: force_off sequence: - service: fan.turn_off target: entity_id: fan.girls_ceiling_fan - conditions: - or: - condition: numeric_state entity_id: weather.tomorrow_io_home_nowcast attribute: temperature above: 18 - condition: numeric_state entity_id: sensor.girls_room_temperature above: 21 sequence: - if: - condition: trigger id: nap_on - condition: numeric_state entity_id: sensor.girls_room_temperature above: 25 then: - service: fan.turn_on target: entity_id: fan.girls_ceiling_fan data: percentage: 66 else: - service: fan.turn_on target: entity_id: fan.girls_ceiling_fan data: percentage: '{{ fan_speed_percentage | default(33) }}' - alias: Nursery Temperature Warning id: nursery_temp_warning triggers: - platform: numeric_state entity_id: sensor.girls_room_temperature below: 17 for: minutes: 30 - platform: numeric_state entity_id: sensor.girls_room_temperature above: 25 for: minutes: 10 conditions: - condition: state entity_id: input_boolean.nap_mode state: 'on' actions: - repeat: for_each: '{{ states.person | selectattr(''state'', ''eq'', ''home'') | map(attribute=''attributes.notifier'') | list}} ' sequence: - service: '{{ repeat.item }}' data: title: Nursery Temperature Warning message: 'Temperature {% if trigger.below != None %}Low{% else %}High{% endif %}: {{ trigger.to_state.state }} ' data: url: /lovelace/girls-room clickAction: /lovelace/girls-room tag: nursery-temp-warning group: nursery-notification - alias: Turn nursery off if forgotten id: nursery_off_if_forgotten mode: queued max: 15 triggers: - platform: template value_template: '{{ is_state(''binary_sensor.girls_room_camera_motion'', ''off'') and is_state(''binary_sensor.girls_room_occupancy'', ''off'') }}' id: timer_start - platform: event event_type: timer.finished event_data: entity_id: timer.girls_lights_off id: timer_finished - platform: state entity_id: light.girls_fan to: 'on' id: cancel_timer conditions: - or: - condition: state entity_id: light.nursery_light state: 'on' - condition: state entity_id: light.nursery_led state: 'on' - condition: state entity_id: input_boolean.nap_mode state: 'off' - condition: time before: '19:00:00' actions: - choose: - conditions: - condition: trigger id: cancel_timer sequence: - service: timer.cancel entity_id: timer.girls_lights_off - conditions: - condition: trigger id: timer_start sequence: - service: timer.start entity_id: timer.girls_lights_off - conditions: - condition: trigger id: timer_finished - or: - condition: state entity_id: light.nursery_light state: 'on' - condition: state entity_id: light.nursery_led state: 'on' sequence: - service: light.turn_on entity_id: light.nursery_led - delay: 10 - service: light.turn_off entity_id: light.nursery_light - delay: 30 - service: light.turn_off entity_id: light.nursery_led - alias: Turn off nursery accessories if forgotten id: nursery_turn_off_white_noise_forgotten triggers: - platform: state entity_id: - switch.nursery_white_noise - fan.nursery_humidifier to: 'on' for: minutes: 30 conditions: - condition: time before: '17:00:00' - condition: state entity_id: switch.nap_mode state: 'off' actions: - service: homeassistant.turn_off target: entity_id: '{{ trigger.entity_id }}' - alias: Turn off nap mode via light switch id: nursery_nap_off_via_lightswitch triggers: - platform: state entity_id: light.nursery_light from: 'off' to: 'on' conditions: - condition: state entity_id: input_boolean.nap_mode state: 'on' actions: - service: input_boolean.turn_off entity_id: input_boolean.nap_mode - alias: Notify if door left open during nap id: nursery_nap_on_door_open triggers: - platform: state entity_id: binary_sensor.nursery_door to: 'on' for: minutes: 10 id: left_open - platform: state entity_id: binary_sensor.nursery_door to: 'off' for: minutes: 5 conditions: - condition: state entity_id: input_boolean.nap_mode state: 'on' - not: - condition: time after: 01:30:00 before: 07:00:00 actions: - if: - condition: trigger id: left_open then: - repeat: for_each: '{{ states.person | selectattr(''state'', ''eq'', ''home'') | map(attribute=''attributes.notifier'') | list}} ' sequence: - service: '{{ repeat.item }}' data: title: Nursery Door Left Open message: Door is Open data: url: /lovelace/girls-room clickAction: /lovelace/girls-room tag: nursery-door-open-warning group: nursery-notification else: - service: notify.adults data: message: clear_notification data: tag: nursery-door-open-warning - alias: Quiet mode control id: nursery_quite_mode_control triggers: - platform: time at: '19:00:00' id: quite_on - platform: state entity_id: input_boolean.nap_mode to: 'on' id: quite_on - platform: time at: 08:00:00 id: quite_off - platform: state entity_id: input_boolean.nap_mode to: 'off' id: quite_off - platform: state entity_id: light.nursery_led to: null id: led_control actions: - choose: - conditions: - condition: trigger id: quite_on sequence: - service: homeassistant.turn_on entity_id: input_boolean.quite_mode - conditions: - condition: trigger id: quite_off sequence: - service: homeassistant.turn_off entity_id: input_boolean.quite_mode - conditions: - condition: trigger id: led_control - condition: time after: '18:30:00' - condition: template value_template: '{{ trigger.to_state.state in [''off'', ''on''] }}' sequence: - service: homeassistant.turn_{{ trigger.to_state.state }} entity_id: input_boolean.quite_mode - alias: Turn on nap mode if forgotten id: nursery_nap_mode_on_forgotten triggers: - platform: state entity_id: binary_sensor.nursery_door to: 'off' for: minutes: 1 conditions: - condition: time after: '19:30:00' - condition: state entity_id: light.nursery_light state: 'off' actions: - service: homeassistant.turn_on entity_id: input_boolean.nap_mode - alias: Nursey Door Open During Sleep id: nursery_door_open_during_sleep mode: single max_exceeded: silent triggers: - platform: state entity_id: binary_sensor.nursery_door to: 'on' conditions: - condition: state entity_id: input_boolean.nap_mode state: 'on' for: minutes: 10 - condition: state entity_id: group.adults state: home - not: - condition: time after: 01:30:00 before: 07:00:00 actions: - repeat: for_each: '{{ states.person | selectattr(''state'', ''eq'', ''home'') | map(attribute=''attributes.notifier'') | list}} ' sequence: - service: '{{ repeat.item }}' data: title: Nursery Door Opened! message: 'Someone has left the nursery ' data: url: /lovelace/girls-room clickAction: /lovelace/girls-room tag: nursery-escape-warning group: nursery-notification - choose: - conditions: - condition: state entity_id: media_player.apple_tv_living_room state: playing sequence: - service: media_player.media_pause entity_id: media_player.apple_tv_living_room - delay: minutes: 3 - alias: Set the girls wakeup time id: nursery_set_girls_wakeup_time triggers: - platform: time at: 09:00:00 actions: - service: calendar.get_events target: entity_id: calendar.ontario_holidays data: duration: hours: 24 response_variable: holidays - service: input_datetime.set_datetime target: entity_id: input_datetime.girls_wakeup_time data: time: "{%- if holidays[\"calendar.ontario_holidays\"][\"events\"]| count > 0\ \ -%}\n 07:30:00\n{%- elif (now() + timedelta(hours=24)).isoweekday() in\ \ [6, 7] -%}\n 07:30:00\n{%- else -%}\n 07:00:00\n{%- endif -%}\n" - alias: Let the girls out of bed id: nursery_let_girls_out_of_bed_time_trigger triggers: - platform: time at: input_datetime.girls_wakeup_time conditions: - or: - condition: state entity_id: group.adults state: home - condition: state entity_id: binary_sensor.guests_present state: 'on' actions: - wait_template: '{{ not is_state("light.nursery_led", "unavailable") }}' - service: script.led_strip_on data: scene_id: scene.nursery_led_on - alias: Reenable nursery light on power loss id: nusery_led_strip_reenable triggers: - platform: state entity_id: sensor.ups_status from: Online - platform: state entity_id: input_boolean.nap_mode to: 'off' from: 'on' - platform: time at: - input_datetime.girls_wakeup_time - '18:30:00' actions: - wait_template: '{{ not is_state("switch.nursery_power_loss_gate", "unavailable") }}' - choose: - conditions: - condition: state entity_id: input_boolean.nap_mode state: 'off' sequence: - service: homeassistant.turn_on entity_id: switch.nursery_power_loss_gate - conditions: - condition: state entity_id: input_boolean.nap_mode state: 'on' - condition: time after: 07:00:00 before: 08:00:00 sequence: - service: homeassistant.turn_on entity_id: switch.nursery_power_loss_gate - alias: Show Nursery Camera on TV automatically id: nursery_show_camera_automatically triggers: - platform: state entity_id: input_boolean.nap_mode to: 'on' conditions: not: - condition: state entity_id: media_player.apple_tv_living_room state: playing actions: - service: switch.turn_on entity_id: switch.entertainment_switch_relay - service: homeassistant.turn_on entity_id: remote.apple_tv_living_room - service: remote.send_command target: entity_id: remote.apple_tv_living_room data: command: wakeup - delay: seconds: 30 - event: homekit_faux_camera_event - delay: seconds: 5 - service: remote.send_command target: entity_id: remote.apple_tv_living_room data: command: home - alias: Set living room lighting when bedtime starts id: nursery_turn_on_kitchen_lighting triggers: - platform: state entity_id: input_boolean.nap_mode to: 'on' conditions: - condition: time after: '18:00:00' actions: - service: light.turn_on entity_id: - light.kitchen_island - service: light.turn_off target: entity_id: - light.living_room_light - light.kitchen_light data: transition: 90 - alias: Girls Light Control id: nursery_girls_light_control mode: single max_exceeded: silent triggers: - trigger: device domain: mqtt device_id: 619b1285a00b9c9b050cedb19e02d4c1 type: action subtype: single actions: - choose: - conditions: - condition: state entity_id: input_boolean.nap_mode state: 'off' - condition: time before: '19:15:00' sequence: - service: light.toggle entity_id: light.nursery_light - service: light.turn_off data: entity_id: - light.nursery_led default: - service: light.toggle data: entity_id: - light.nursery_led - service: light.turn_off entity_id: light.nursery_light - delay: seconds: 5 - alias: Set warmer temperature for LED strip id: nursery_warmer_temp_led triggers: - platform: time at: '19:00:00' - platform: state entity_id: light.nursery_led to: 'on' conditions: - condition: time after: '18:00:00' before: '21:00:00' - condition: state entity_id: light.nursery_led state: 'on' actions: - service: light.turn_on target: entity_id: light.nursery_led data: brightness: 254 color_temp_kelvin: 2000 - alias: Turn on LED strip for bedtime routine id: nursery_led_on_bedtime_routine triggers: - platform: state entity_id: light.nursery_light to: 'on' conditions: - condition: time after: '18:00:00' actions: - service: light.turn_on data: entity_id: - light.nursery_led - service: scene.turn_on entity_id: scene.nursery_led_on - delay: seconds: 1 - alias: Control hall lights at bedtime id: girls_control_hall_lights_bedtime mode: single max_exceeded: silent triggers: - platform: state entity_id: input_boolean.nap_mode to: 'on' actions: - service: light.turn_off entity_id: light.upstairs_hall - if: - condition: numeric_state entity_id: sun.sun attribute: elevation below: 4.0 then: - service: light.turn_on entity_id: light.main_stairs else: - service: light.turn_off entity_id: light.main_stairs - alias: Turn off hall lights door open id: girls_hall_lights_off_door_open mode: restart trace: stored_traces: 50 triggers: - platform: state entity_id: binary_sensor.nursery_door to: 'on' not_from: - unknown - unavailable id: lights_off - platform: event event_type: timer.finished event_data: entity_id: timer.bedtime_stairs_light_off id: lights_off - platform: state entity_id: binary_sensor.nursery_door to: 'off' not_from: - unknown - unavailable id: lights_on conditions: - condition: state entity_id: input_boolean.nap_mode state: 'on' actions: - choose: - conditions: - condition: trigger id: lights_off sequence: - service: light.turn_off entity_id: - light.main_stairs - light.upstairs_hall - service: timer.cancel entity_id: timer.bedtime_stairs_light_off - conditions: - and: - condition: trigger id: lights_on - condition: time after: '18:30:00' before: '21:45:00' sequence: - delay: seconds: 5 - service: light.turn_on entity_id: light.main_stairs - service: timer.start entity_id: timer.bedtime_stairs_light_off - alias: Link Switch LED to light state id: girls_linked_led_to_light_state mode: restart triggers: - platform: state entity_id: light.girls_fan to: - 'on' - 'off' conditions: - condition: template value_template: '{{ trigger.to_state.state in ["off", "on"] }}' actions: service: light.turn_{{ trigger.to_state.state }} entity_id: light.girls_room_switch - alias: Mute Girls Speaker at bedtime id: girls_mute_speaker_at_bedtime triggers: - platform: state entity_id: input_boolean.nap_mode to: 'on' actions: - service: media_player.volume_set data: volume_level: 0.01 entity_id: media_player.girls_room_sonos - alias: Yoto Player Auto Play at bedtime id: girls_yoto_player_bedtime triggers: - platform: state entity_id: input_boolean.nap_mode from: 'off' to: 'on' conditions: not: - condition: state entity_id: media_player.bedroom_player state: playing actions: - wait_template: '{{ states(''binary_sensor.bedroom_player_online'') not in [''offline'', ''unknown'', ''unavailable''] }}' timeout: minutes: 30 continue_on_timeout: false - action: media_player.play_media data: media_content_id: 7AzCP-01-01 media_content_type: music target: entity_id: media_player.bedroom_player - action: media_player.volume_set data: volume_level: 0.5 target: entity_id: media_player.bedroom_player - alias: Auto sleep timer for Yotos overnight id: girls_yoto_auto_sleep_players_overnight triggers: - platform: state entity_id: - media_player.bedroom_player - media_player.merry_and_vivs_player to: playing conditions: - condition: time after: '23:00:00' before: 06:00:00 actions: - action: number.set_value data: value: 900 target: entity_id: "{% if trigger.entity_id == \"media_player.bedroom_player\" %}\n\ \ number.bedroom_player_sleep_timer_seconds_remaining\n{% else %}\n number.merry_and_vivs_player_sleep_timer_seconds_remaining\n\ {% endif %}\n" - alias: Yoto Player Turn off automatically id: girls_yoto_auto_off triggers: - platform: event event_type: timer.finished event_data: entity_id: timer.bedtime_stairs_light_off actions: - wait_template: '{{ is_state(''binary_sensor.girls_room_motion'', ''off'') and is_state(''binary_sensor.girls_room_occupancy'', ''off'') }}' timeout: minutes: 90 continue_on_timeout: false - action: media_player.media_stop target: entity_id: - media_player.bedroom_player - media_player.merry_and_vivs_player - alias: Return Home Annoucement id: return_home_annoucement trigger: platform: zone entity_id: - device_tracker.michaels_iphone zone: zone.home event: enter condition: - condition: state entity_id: person.tiff state: home - condition: state entity_id: input_boolean.nap_mode state: 'on' action: - service: notify.mobile_app_tiffanys_iphone data: title: Mike is almost home message: Keep Stella Quiet - delay: minutes: 15 mode: single max_exceeded: silent - alias: Tiff Returning Home Notification id: tiff_return_home_notification trigger: platform: zone entity_id: person.tiff zone: zone.home event: enter condition: - condition: state entity_id: person.mike state: home for: minutes: 10 action: - service: notify.mobile_app_michaels_iphone data: title: Tiff is returning home message: Tiff has entered the home zone data: tag: tiff-return-home group: presence-notification - alias: Update notification id: update_notification trigger: - platform: state entity_id: binary_sensor.docker_hub_update_available to: 'on' action: - service: notify.mobile_app_michaels_iphone data: message: There is a new Home Assistant release available. - alias: Presence Arriving id: general_presence_notification_home trigger: - platform: state entity_id: - person.bumpa - person.lisa from: not_home to: home condition: - condition: state entity_id: person.mike state: home action: service: notify.mobile_app_michaels_iphone data: title: HASS Presence Notification message: '{{ trigger.to_state.attributes.friendly_name }} is arriving ' data: tag: person-presence-notification group: presence-notification - alias: Ask if Pupper Home after Dark id: ask_pupper_home trigger: - platform: numeric_state entity_id: sun.sun attribute: elevation below: 5 condition: - condition: state entity_id: alarm_control_panel.master state: armed_away - not: - condition: state entity_id: alarm_control_panel.master state: armed_vacation action: - variables: action_home: '{{ ''HOME_'' ~ context.id }}' action_away: '{{ ''AWAY_'' ~ context.id }}' - service: notify.mobile_app_michaels_iphone data: message: Is the pupper home alone? data: actions: - action: '{{ action_home }}' title: Pupper Home activationMode: background authenticationRequired: true destructive: false behavior: default - action: '{{ action_away }}' title: Not Home activationMode: background authenticationRequired: true destructive: true behavior: default - wait_for_trigger: - platform: event event_type: mobile_app_notification_action event_data: action: '{{ action_home }}' - platform: event event_type: mobile_app_notification_action event_data: action: '{{ action_away }}' - choose: - conditions: '{{ wait.trigger.event.data.action == action_home }}' sequence: - service: input_boolean.turn_on entity_id: input_boolean.pupper_home - conditions: '{{ wait.trigger.event.data.action == action_away }}' sequence: - service: input_boolean.turn_off entity_id: input_boolean.pupper_home - alias: Set light on for Pupper at dark id: set_pupper_light_on trigger: - platform: sun event: sunset - platform: state entity_id: alarm_control_panel.master to: armed_away condition: - condition: numeric_state entity_id: sun.sun attribute: elevation below: 2.0 - condition: state entity_id: input_boolean.pupper_home state: 'on' action: - delay: minutes: 5 - service: homeassistant.turn_on entity_id: light.kitchen_island - alias: Evening Convenience Control id: upstairs_evening_convenience_control mode: single max_exceeded: silent trigger: - trigger: device domain: mqtt device_id: e3bc901892c55fbcaa6dd42876632c35 type: action subtype: down_double - trigger: device domain: mqtt device_id: 0d619322f1e8664e17f93285090c18bd type: action subtype: down_double - trigger: device domain: mqtt device_id: 67df18469d484ee9d7870f2a5fb692cb type: action subtype: down_double condition: - condition: time after: '21:00:00' actions: - event: goodnight_event - alias: Vacation mode id: vacation_mode_depart mode: single max_exceeded: silent trigger: - platform: numeric_state entity_id: sensor.home_nearest_distance above: 55000 condition: - condition: state entity_id: device_tracker.faux_girls_home state: not_home - condition: state entity_id: binary_sensor.guests_present state: 'off' action: - service: select.select_option entity_id: select.my_ecobee_current_mode data: option: away - service: light.turn_off continue_on_error: true target: floor_id: - top_floor - main_floor - basement - service: fan.turn_off target: floor_id: - top_floor - service: cover.close_cover entity_id: cover.garage - service: lock.lock entity_id: - lock.locks - service: alarm_control_panel.alarm_arm_vacation target: entity_id: alarm_control_panel.master - alias: Keep Ecobee in Away mode id: vacaiton_keep_ecobee_away trigger: - platform: state entity_id: select.my_ecobee_current_mode from: away not_to: - unknown - unavailable condition: - condition: state entity_id: alarm_control_panel.master state: armed_vacation action: - service: notify.mobile_app_michaels_iphone data: message: Consider Setting Ecobee Vacation - service: select.select_option entity_id: select.my_ecobee_current_mode data: option: away - alias: Returning from vacation id: vacation_mode_return mode: single max_exceeded: silent trigger: - platform: numeric_state entity_id: sensor.home_nearest_distance below: 55000 condition: - not: - condition: state entity_id: alarm_control_panel.master state: disarmed action: - service: select.select_option entity_id: select.my_ecobee_current_mode data: option: home - service: alarm_control_panel.alarm_arm_away target: entity_id: alarm_control_panel.master - alias: Vacation Lighting mode: single max_exceeded: silent id: vacation_lighting trigger: - platform: state entity_id: alarm_control_panel.master to: - armed_vacation id: armed - platform: state entity_id: alarm_control_panel.master to: disarmed action: - choose: - conditions: - condition: trigger id: armed sequence: - service: switch.turn_on entity_id: switch.simulated_light_presence default: - service: switch.turn_off entity_id: switch.simulated_light_presence