Permalink
Cannot retrieve contributors at this time
Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up| ################################################################# | |
| ## Locaiton Automations | |
| ################################################################# | |
| ########################################################## | |
| ## Household Away Mode | |
| ########################################################## | |
| - alias: Location - Household Away Mode | |
| id: 'location_household_away_mode' | |
| trigger: | |
| - platform: state | |
| entity_id: group.household | |
| from: 'home' | |
| to: 'not_home' | |
| condition: | |
| - condition: state | |
| entity_id: input_boolean.disable_home_away | |
| state: 'off' | |
| action: | |
| - service: lock.lock | |
| entity_id: | |
| - lock.front_door | |
| - lock.back_door | |
| - lock.basement_door | |
| - service: light.turn_off | |
| entity_id: | |
| - group.interior_lights | |
| - light.backyard_patio | |
| - light.backyard_deck | |
| - service: switch.turn_off | |
| entity_id: | |
| - switch.air_purifier | |
| - switch.lower_backyard_lighting | |
| - switch.backyard_patio_lighting | |
| - switch.fireplace | |
| - switch.basement_heater | |
| - switch.bug_zapper | |
| - switch.USER2_office_desk_lamp | |
| - service: fan.turn_off | |
| entity_id: | |
| - fan.office_fan | |
| - fan.living_room_east | |
| - fan.living_room_west | |
| - service: cover.close_cover | |
| entity_id: | |
| - cover.USER1_s_office_blinds | |
| - service: homeassistant.turn_off | |
| entity_id: | |
| - input_boolean.guest_mode | |
| - input_boolean.interior_holiday | |
| - input_boolean.office_rainbow | |
| - input_boolean.livingroom_rainbow | |
| - input_boolean.front_porch_rainbow | |
| - input_boolean.pop_music | |
| - input_boolean.jazz_music | |
| - input_boolean.chill_music | |
| - input_boolean.electronic_music | |
| - input_boolean.classical_music | |
| - input_boolean.adele_music | |
| - input_boolean.group_all_sonos | |
| - service: input_select.select_option | |
| data: | |
| entity_id: input_select.living_room_tv_remote | |
| option: "PowerOff" | |
| - service: input_select.select_option | |
| data: | |
| entity_id: input_select.bedroom_tv_remote | |
| option: "PowerOff" | |
| - service: input_select.select_option | |
| data: | |
| entity_id: input_select.USER1_s_office_tv_remote | |
| option: "PowerOff" | |
| - service: input_select.select_option | |
| data: | |
| entity_id: input_select.sonos | |
| option: "None" | |
| - service: media_player.media_stop | |
| entity_id: | |
| - media_player.sonos_surround_sound | |
| - media_player.sonos_living_room | |
| - media_player.sonos_dining_room | |
| - media_player.sonos_kitchen | |
| - media_player.sonos_bathroom | |
| - media_player.sonos_bedroom | |
| - media_player.sonos_USER1s_office | |
| - media_player.sonos_USER1s_office_move | |
| - media_player.sonos_USER2s_office | |
| - media_player.sonos_move | |
| - media_player.sonos_backyard_patio | |
| ########################################################## | |
| ## USER1 Home from Walking Unlock Doors Turn On Garage Light | |
| ########################################################## | |
| - alias: Location - USER1 Home from Waling Unlock Doors Turn On Garage Light | |
| id: 'location_USER1_home_from_walking_unlock_doors_turn_on_garage_light' | |
| trigger: | |
| - platform: state | |
| entity_id: person.USER1 | |
| from: 'not_home' | |
| to: 'home' | |
| condition: | |
| - condition: state | |
| entity_id: input_boolean.disable_home_away | |
| state: 'off' | |
| - condition: state | |
| entity_id: input_boolean.USER1_away | |
| state: 'on' | |
| - condition: state | |
| entity_id: input_boolean.USER1_away_driving | |
| state: 'off' | |
| action: | |
| - service: lock.unlock | |
| entity_id: | |
| - lock.back_door | |
| - lock.front_door | |
| ########################################################## | |
| ## USER1 Home from Driving Unlock Door | |
| ########################################################## | |
| - alias: Location - USER1 Home from Driving Unlock Door | |
| id: 'location_USER1_home_from_driving_unlock_door' | |
| trigger: | |
| - platform: state | |
| entity_id: person.USER1 | |
| from: 'not_home' | |
| to: 'home' | |
| condition: | |
| - condition: state | |
| entity_id: input_boolean.disable_auto_garage | |
| state: 'off' | |
| - condition: state | |
| entity_id: input_boolean.disable_home_away | |
| state: 'off' | |
| - condition: state | |
| entity_id: input_boolean.USER1_away | |
| state: 'on' | |
| - condition: state | |
| entity_id: input_boolean.USER1_away_driving | |
| state: 'on' | |
| - condition: state | |
| entity_id: lock.back_door | |
| state: 'locked' | |
| action: | |
| - service: lock.unlock | |
| entity_id: lock.back_door | |
| ########################################################## | |
| ## After USER1 Home Lock Doors | |
| ######################################################## | |
| - alias: Location - After USER1 Home Lock Doors | |
| id: 'location_after_USER1_home_lock_doors' | |
| trigger: | |
| - platform: state | |
| entity_id: input_boolean.USER1_away | |
| from: 'on' | |
| to: 'off' | |
| condition: | |
| - condition: state | |
| entity_id: input_boolean.disable_lock_unlock_doors | |
| state: 'off' | |
| - condition: state | |
| entity_id: binary_sensor.front_door_opened | |
| state: 'off' | |
| - condition: state | |
| entity_id: binary_sensor.back_door_opened | |
| state: 'off' | |
| action: | |
| - service: lock.lock | |
| entity_id: | |
| - lock.back_door | |
| - lock.front_door | |
| ########################################################## | |
| ## USER2 Home from Walking Unlock Doors | |
| ########################################################## | |
| - alias: Location - USER2 Home from Walking Unlock Doors | |
| id: 'location_USER2_home_from_walking_unlock_doors' | |
| trigger: | |
| - platform: state | |
| entity_id: person.USER2 | |
| from: 'not_home' | |
| to: 'home' | |
| condition: | |
| - condition: state | |
| entity_id: input_boolean.disable_home_away | |
| state: 'off' | |
| - condition: state | |
| entity_id: input_boolean.USER2_away | |
| state: 'on' | |
| - condition: state | |
| entity_id: input_boolean.USER2_away_driving | |
| state: 'off' | |
| action: | |
| - service: lock.unlock | |
| entity_id: | |
| - lock.back_door | |
| - lock.front_door | |
| ########################################################## | |
| ## USER2 Home from Driving Unlock Door | |
| ########################################################## | |
| - alias: Location - USER2 Home from Driving Unlock Door | |
| id: 'location_USER2_home_from_driving_unlock_door' | |
| trigger: | |
| - platform: state | |
| entity_id: person.USER2 | |
| # from: 'not_home' | |
| to: 'home' | |
| condition: | |
| - condition: state | |
| entity_id: input_boolean.disable_auto_garage | |
| state: 'off' | |
| - condition: state | |
| entity_id: input_boolean.disable_home_away | |
| state: 'off' | |
| - condition: state | |
| entity_id: input_boolean.USER2_away | |
| state: 'on' | |
| - condition: state | |
| entity_id: input_boolean.USER2_away_driving | |
| state: 'on' | |
| - condition: state | |
| entity_id: lock.back_door | |
| state: 'locked' | |
| action: | |
| - service: lock.unlock | |
| entity_id: lock.back_door | |
| ########################################################## | |
| ## After USER2 Home Lock Doors | |
| ######################################################## | |
| - alias: Location - USER2 Home Lock Doors | |
| id: 'location_USER2_home_lock_doors' | |
| trigger: | |
| - platform: state | |
| entity_id: input_boolean.USER2_away | |
| from: 'on' | |
| to: 'off' | |
| condition: | |
| - condition: state | |
| entity_id: input_boolean.disable_lock_unlock_doors | |
| state: 'off' | |
| - condition: state | |
| entity_id: binary_sensor.front_door_opened | |
| state: 'off' | |
| - condition: state | |
| entity_id: binary_sensor.back_door_opened | |
| state: 'off' | |
| action: | |
| - service: lock.lock | |
| entity_id: | |
| - lock.back_door | |
| - lock.front_door | |
| ########################################################## | |
| ## USER1 Home Turn On Lights | |
| ########################################################## | |
| - alias: Location - USER1 Home Turn On Lights | |
| id: 'location_USER1_home_turn_on_lights' | |
| trigger: | |
| - platform: state | |
| entity_id: person.USER1 | |
| from: 'not_home' | |
| to: 'home' | |
| condition: | |
| - condition: state | |
| entity_id: sun.sun | |
| state: 'below_horizon' | |
| - condition: state | |
| entity_id: input_boolean.disable_home_away | |
| state: 'off' | |
| - condition: state | |
| entity_id: input_boolean.USER1_away | |
| state: 'on' | |
| action: | |
| - service: light.turn_on | |
| entity_id: | |
| - light.kitchen_sink | |
| - light.living_room_lamps | |
| - light.dining_room_table | |
| data: | |
| color_temp: 447 | |
| brightness_pct: 60 | |
| - service: light.turn_on | |
| entity_id: | |
| - light.media_center_lighting | |
| data: | |
| effect: random | |
| brightness_pct: 75 | |
| - service: light.turn_on | |
| entity_id: | |
| - light.kitchen_cabinets | |
| data: | |
| brightness_pct: 2 | |
| - service: light.turn_on | |
| entity_id: | |
| - light.hallway_light | |
| data: | |
| brightness_pct: 25 | |
| - service: light.turn_on | |
| entity_id: | |
| - light.front_porch | |
| - light.back_door | |
| - light.garage_light | |
| data: | |
| brightness_pct: 100 | |
| - service: light.turn_on | |
| entity_id: | |
| - light.globe | |
| data: | |
| color_temp: 366 | |
| brightness_pct: 20 | |
| ########################################################## | |
| ## USER1 Home Turn On Lights during Rain | |
| ########################################################## | |
| - alias: Location - USER1 Home Turn On Lights during Rain | |
| id: 'location_USER1_home_turn_on_lights_during_rain' | |
| trigger: | |
| - platform: state | |
| entity_id: person.USER1 | |
| from: 'not_home' | |
| to: 'home' | |
| condition: | |
| - condition: state | |
| entity_id: sun.sun | |
| state: 'above_horizon' | |
| - condition: state | |
| entity_id: input_boolean.disable_home_away | |
| state: 'off' | |
| - condition: state | |
| entity_id: input_boolean.USER1_away | |
| state: 'on' | |
| - condition: state | |
| entity_id: sensor.dark_sky_precip | |
| state: 'rain' | |
| action: | |
| - service: light.turn_on | |
| entity_id: | |
| - light.living_room_lamps | |
| data: | |
| color_temp: 447 | |
| brightness_pct: 25 | |
| - service: light.turn_on | |
| entity_id: | |
| - light.media_center_lighting | |
| data: | |
| effect: random | |
| brightness_pct: 75 | |
| - service: light.turn_on | |
| entity_id: | |
| - light.kitchen_cabinets | |
| - light.kitchen_sink | |
| - light.dining_room_table | |
| - light.hallway_light | |
| data: | |
| brightness_pct: 2 | |
| - service: light.turn_on | |
| entity_id: | |
| - light.globe | |
| data: | |
| color_temp: 366 | |
| brightness_pct: 20 | |
| ########################################################## | |
| ## USER1 Home Reset Front Porch Lights Brightness | |
| ########################################################## | |
| - alias: Location - USER1 Home Reset Front Porch Lights Brightness | |
| id: 'location_USER1_home_reset_front_porch_lights_brightness' | |
| trigger: | |
| - platform: state | |
| entity_id: input_boolean.USER1_away | |
| from: 'on' | |
| to: 'off' | |
| condition: | |
| - condition: state | |
| entity_id: sun.sun | |
| state: 'below_horizon' | |
| - condition: state | |
| entity_id: input_boolean.disable_home_away | |
| state: 'off' | |
| - condition: state | |
| entity_id: input_select.holiday | |
| state: 'None' | |
| action: | |
| - service: light.turn_on | |
| entity_id: | |
| - light.front_porch | |
| data: | |
| brightness_pct: 50 | |
| transition: 120 | |
| ########################################################## | |
| ## USER1 Home Reset Back Door Lights Brightness | |
| ########################################################## | |
| - alias: Location - USER1 Home Reset Back Door Lights Brightness | |
| id: 'location_USER1_home_reset_back_door_lights_brightness' | |
| trigger: | |
| - platform: state | |
| entity_id: input_boolean.USER1_away | |
| from: 'on' | |
| to: 'off' | |
| condition: | |
| - condition: state | |
| entity_id: sun.sun | |
| state: 'below_horizon' | |
| - condition: state | |
| entity_id: input_boolean.disable_home_away | |
| state: 'off' | |
| action: | |
| - service: light.turn_on | |
| entity_id: | |
| - light.back_door | |
| data: | |
| brightness_pct: 2 | |
| transition: 120 | |
| ########################################################## | |
| ## USER1 Home Dim Garage Light after 16 Mins | |
| ########################################################## | |
| - alias: Location - USER1 Home Dim Garage Light after 16 Mins | |
| id: 'location_USER1_home_dim_garage_light_after_16_mins' | |
| trigger: | |
| - platform: state | |
| entity_id: input_boolean.USER1_away | |
| from: 'on' | |
| to: 'off' | |
| for: | |
| hours: 0 | |
| minutes: 6 | |
| seconds: 0 | |
| condition: | |
| - condition: state | |
| entity_id: sun.sun | |
| state: 'below_horizon' | |
| - condition: state | |
| entity_id: input_boolean.disable_home_away | |
| state: 'off' | |
| action: | |
| - service: light.turn_on | |
| entity_id: | |
| - light.garage_light | |
| data: | |
| brightness_pct: 2 | |
| ########################################################## | |
| ## USER2 Home Turn On Lights | |
| ########################################################## | |
| - alias: Location - USER2 Home Turn On Lights | |
| id: 'location_USER2_home_turn_on_lights' | |
| trigger: | |
| - platform: state | |
| entity_id: person.USER2 | |
| #from: 'not_home' | |
| to: 'home' | |
| condition: | |
| - condition: state | |
| entity_id: sun.sun | |
| state: 'below_horizon' | |
| - condition: state | |
| entity_id: input_boolean.disable_home_away | |
| state: 'off' | |
| - condition: state | |
| entity_id: input_boolean.USER2_away | |
| state: 'on' | |
| action: | |
| - service: light.turn_on | |
| entity_id: | |
| - light.kitchen_sink | |
| - light.living_room_lamps | |
| - light.dining_room_table | |
| data: | |
| color_temp: 447 | |
| brightness_pct: 60 | |
| - service: light.turn_on | |
| entity_id: | |
| - light.media_center_lighting | |
| data: | |
| effect: random | |
| brightness_pct: 75 | |
| - service: light.turn_on | |
| entity_id: | |
| - light.kitchen_cabinets | |
| data: | |
| brightness_pct: 2 | |
| - service: light.turn_on | |
| entity_id: | |
| - light.hallway_light | |
| data: | |
| brightness_pct: 25 | |
| - service: light.turn_on | |
| entity_id: | |
| - light.front_porch | |
| - light.back_door | |
| - light.garage_light | |
| data: | |
| brightness_pct: 100 | |
| - service: light.turn_on | |
| entity_id: | |
| - light.globe | |
| data: | |
| color_temp: 366 | |
| brightness_pct: 20 | |
| ########################################################## | |
| ## USER2 Home from Work Lights Turn On Lights | |
| ########################################################## | |
| - alias: Location - USER2 Home from Work Turn On Lights | |
| id: 'location_USER2_home_from_work_turn_on_lights' | |
| trigger: | |
| - platform: state | |
| entity_id: person.USER2 | |
| #from: 'not_home' | |
| to: 'home' | |
| condition: | |
| - condition: state | |
| entity_id: sun.sun | |
| state: 'below_horizon' | |
| - condition: state | |
| entity_id: input_boolean.disable_home_away | |
| state: 'off' | |
| - condition: state | |
| entity_id: input_boolean.USER2_away | |
| state: 'on' | |
| - condition: time | |
| after: '15:45:00' | |
| before: '17:30:00' | |
| - condition: time | |
| weekday: | |
| - mon | |
| - tue | |
| - wed | |
| - thu | |
| - fri | |
| action: | |
| - service: light.turn_on | |
| entity_id: | |
| - light.bathroom_lights | |
| data: | |
| brightness_pct: 25 | |
| - service: light.turn_on | |
| entity_id: | |
| - light.USER1s_nightstand | |
| - light.USER2s_nightstand | |
| - light.bedroom_lamp | |
| - light.closet_lamp | |
| data: | |
| transition: 90 | |
| brightness_pct: 50 | |
| ########################################################## | |
| ## USER2 Home Turn On Lights during Rain | |
| ########################################################## | |
| - alias: Location - USER2 Home Turn On Lights during Rain | |
| id: 'location_USER2_home_turn_on_lights_during_rain' | |
| trigger: | |
| - platform: state | |
| entity_id: person.USER2 | |
| from: 'not_home' | |
| to: 'home' | |
| condition: | |
| - condition: state | |
| entity_id: sun.sun | |
| state: 'above_horizon' | |
| - condition: state | |
| entity_id: input_boolean.disable_home_away | |
| state: 'off' | |
| - condition: state | |
| entity_id: input_boolean.USER2_away | |
| state: 'on' | |
| - condition: state | |
| entity_id: sensor.dark_sky_precip | |
| state: 'rain' | |
| action: | |
| - service: light.turn_on | |
| entity_id: | |
| - light.living_room_lamps | |
| data: | |
| color_temp: 447 | |
| brightness_pct: 25 | |
| - service: light.turn_on | |
| entity_id: | |
| - light.media_center_lighting | |
| data: | |
| effect: random | |
| brightness_pct: 75 | |
| - service: light.turn_on | |
| entity_id: | |
| - light.kitchen_cabinets | |
| - light.kitchen_sink | |
| - light.dining_room_table | |
| - light.hallway_light | |
| data: | |
| brightness_pct: 2 | |
| - service: light.turn_on | |
| entity_id: | |
| - light.globe | |
| data: | |
| color_temp: 366 | |
| brightness_pct: 20 | |
| ########################################################## | |
| ## USER2 Home Reset Front Porch Lights Brightness | |
| ########################################################## | |
| - alias: Location - USER2 Home Reset Front Porch Lights Brightness | |
| id: 'location_USER2_home_reset_front_porch_lights_brightness' | |
| trigger: | |
| - platform: state | |
| entity_id: input_boolean.USER2_away | |
| from: 'on' | |
| to: 'off' | |
| condition: | |
| - condition: state | |
| entity_id: sun.sun | |
| state: 'below_horizon' | |
| - condition: state | |
| entity_id: input_boolean.disable_home_away | |
| state: 'off' | |
| - condition: state | |
| entity_id: input_select.holiday | |
| state: 'None' | |
| action: | |
| - service: light.turn_on | |
| entity_id: | |
| - light.front_porch | |
| data: | |
| brightness_pct: 50 | |
| transition: 120 | |
| ########################################################## | |
| ## USER2 Home Reset Back Door Lights Brightness | |
| ########################################################## | |
| - alias: Location - USER2 Home Reset Back Door Lights Brightness | |
| id: 'location_USER2_home_reset_back_door_lights_brightness' | |
| trigger: | |
| - platform: state | |
| entity_id: input_boolean.USER2_away | |
| from: 'on' | |
| to: 'off' | |
| condition: | |
| - condition: state | |
| entity_id: sun.sun | |
| state: 'below_horizon' | |
| - condition: state | |
| entity_id: input_boolean.disable_home_away | |
| state: 'off' | |
| action: | |
| - service: light.turn_on | |
| entity_id: | |
| - light.back_door | |
| data: | |
| brightness_pct: 2 | |
| transition: 120 | |
| ########################################################## | |
| ## USER2 Home Dim Garage Light after 16 Mins | |
| ########################################################## | |
| - alias: Location - USER2 Home Dim Garage Light after 16 Mins | |
| id: 'location_USER2_home_dim_garage_light_after_16_mins' | |
| trigger: | |
| - platform: state | |
| entity_id: input_boolean.USER2_away | |
| from: 'on' | |
| to: 'off' | |
| for: | |
| hours: 0 | |
| minutes: 6 | |
| seconds: 0 | |
| condition: | |
| - condition: state | |
| entity_id: input_boolean.disable_home_away | |
| state: 'off' | |
| - condition: state | |
| entity_id: sun.sun | |
| state: 'below_horizon' | |
| action: | |
| - service: light.turn_on | |
| entity_id: | |
| - light.garage_light | |
| data: | |
| brightness_pct: 2 | |
| ########################################################## | |
| ## USER1 Away Shut Off Office | |
| ########################################################## | |
| - alias: Location - USER1 Away Shut Off Office | |
| id: 'location_USER1_away_shut_off_office' | |
| trigger: | |
| - platform: state | |
| entity_id: input_boolean.USER1_away | |
| from: 'off' | |
| to: 'on' | |
| condition: | |
| - condition: state | |
| entity_id: input_boolean.disable_home_away | |
| state: 'off' | |
| action: | |
| - service: switch.turn_off | |
| entity_id: | |
| - switch.air_purifier | |
| - service: fan.turn_off | |
| entity_id: | |
| - fan.office_fan | |
| - service: light.turn_off | |
| entity_id: | |
| - light.USER1_office_lights | |
| - service: cover.close_cover | |
| entity_id: | |
| - cover.USER1_s_office_blinds | |
| - service: input_select.select_option | |
| data: | |
| entity_id: input_select.USER1_s_office_tv_remote | |
| option: "PowerOff" | |
| ########################################################## | |
| ## USER2 Away Shut Off Office | |
| ########################################################## | |
| - alias: Location - USER2 Away Shut Off Office | |
| id: 'location_USER2_away_shut_off_office' | |
| trigger: | |
| - platform: state | |
| entity_id: input_boolean.USER2_away | |
| from: 'off' | |
| to: 'on' | |
| condition: | |
| - condition: state | |
| entity_id: input_boolean.disable_home_away | |
| state: 'off' | |
| action: | |
| - service: light.turn_off | |
| entity_id: | |
| - light.USER2_s_office_ceiling | |
| - service: switch.turn_off | |
| entity_id: | |
| - switch.USER2_office_desk_lamp | |
| ########################################################## | |
| ## Close Garage Door when USER1 Leaves | |
| ########################################################## | |
| - alias: Location - Close Garage when USER1 Leaves | |
| id: 'location_close_garage_when_USER1_leaves' | |
| trigger: | |
| - platform: state | |
| entity_id: input_boolean.USER1_away | |
| from: 'off' | |
| to: 'on' | |
| condition: | |
| - condition: state | |
| entity_id: input_boolean.disable_auto_garage | |
| state: 'off' | |
| - condition: state | |
| entity_id: cover.garage_door | |
| state: 'open' | |
| action: | |
| - service: lifx.effect_pulse | |
| data: | |
| entity_id: light.garage_interior | |
| cycles: '5' | |
| - delay: '00:00:05' | |
| - service: cover.close_cover | |
| entity_id: cover.garage_door | |
| ########################################################## | |
| ## Close Garage Door when USER2 Leaves | |
| ########################################################## | |
| - alias: Location - Close Garage when USER2 Leaves | |
| id: 'location_close_garage_when_USER2_leaves' | |
| trigger: | |
| - platform: state | |
| entity_id: input_boolean.USER2_away | |
| from: 'off' | |
| to: 'on' | |
| condition: | |
| - condition: state | |
| entity_id: input_boolean.disable_auto_garage | |
| state: 'off' | |
| - condition: state | |
| entity_id: cover.garage_door | |
| state: 'open' | |
| action: | |
| - service: lifx.effect_pulse | |
| data: | |
| entity_id: light.garage_interior | |
| cycles: '5' | |
| - delay: '00:00:05' | |
| - service: cover.close_cover | |
| entity_id: cover.garage_door | |
| ########################################################## | |
| ## Lock Back Door when USER2 Leaves in the Morning | |
| ########################################################## | |
| - alias: Location - Lock Back Door when USER2 Leaves | |
| id: 'location_lock_back_door_when_USER2_leaves' | |
| trigger: | |
| - platform: state | |
| entity_id: person.USER2 | |
| from: 'home' | |
| to: 'not_home' | |
| condition: | |
| - condition: time | |
| after: '05:00:00' | |
| before: '07:00:00' | |
| - condition: state | |
| entity_id: input_boolean.disable_lock_unlock_doors | |
| state: 'off' | |
| - condition: state | |
| entity_id: binary_sensor.back_door_opened | |
| state: 'off' | |
| - condition: state | |
| entity_id: lock.back_door | |
| state: 'unlocked' | |
| action: | |
| - service: lock.lock | |
| entity_id: lock.back_door | |
| ########################################################## | |
| ## Turn Off Lights when USER2 Leaves | |
| ########################################################## | |
| - alias: Location - Turn Off Lights when USER2 Leaves | |
| id: 'location_turn_off_lights_when_USER2_leaves' | |
| trigger: | |
| - platform: state | |
| entity_id: person.USER2 | |
| from: 'home' | |
| to: 'not_home' | |
| condition: | |
| - condition: time | |
| after: '06:00:00' | |
| before: '07:30:00' | |
| - condition: state | |
| entity_id: input_boolean.disable_home_away | |
| state: 'off' | |
| - condition: time | |
| weekday: | |
| - mon | |
| - tue | |
| - wed | |
| - thu | |
| - fri | |
| - condition: not | |
| conditions: | |
| - condition: state | |
| entity_id: group.friends_and_family | |
| state: 'home' | |
| action: | |
| - service: light.turn_off | |
| entity_id: | |
| - group.interior_lights | |
| - light.back_door | |
| - light.garage_light | |
| - delay: '00:02:00' | |
| - service: light.turn_off | |
| entity_id: | |
| - light.back_door | |
| ########################################################## | |
| ## Turn On Outdoor Lighting when Home | |
| ########################################################## | |
| - alias: Location - Turn On Outdoor Lighting when Home | |
| id: 'location_turn_on_outdoor_lighting_when_home' | |
| trigger: | |
| - platform: state | |
| entity_id: group.household | |
| from: 'not_home' | |
| to: 'home' | |
| condition: | |
| condition: and | |
| conditions: | |
| - condition: state | |
| entity_id: input_boolean.disable_home_away | |
| state: 'off' | |
| - condition: state | |
| entity_id: sun.sun | |
| state: 'below_horizon' | |
| - condition: or | |
| conditions: | |
| - condition: state | |
| entity_id: input_boolean.USER1_away | |
| state: 'on' | |
| - condition: state | |
| entity_id: input_boolean.USER2_away | |
| state: 'on' | |
| action: | |
| - service: switch.turn_on | |
| entity_id: | |
| - switch.backyard_patio_lighting | |
| - switch.lower_backyard_lighting | |
| - switch.front_yard_lighting | |
| - service: light.turn_on | |
| entity_id: | |
| - light.backyard_patio | |
| - light.backyard_deck | |
| data: | |
| brightness_pct: 2 | |
| ########################################################## | |
| ## Turn On Backyard Lighting when Friends Visiting | |
| ########################################################## | |
| - alias: Location - Turn On Backyard Lighting when Friends Visiting | |
| id: 'location_turn_on_backyard_lighting_when_friends_visiting' | |
| trigger: | |
| - platform: state | |
| entity_id: group.friends_and_family | |
| from: 'not_home' | |
| to: 'home' | |
| condition: | |
| - condition: state | |
| entity_id: sun.sun | |
| state: 'below_horizon' | |
| - condition: state | |
| entity_id: input_boolean.disable_home_away | |
| state: 'off' | |
| - condition: time | |
| after: '13:00:00' | |
| before: '23:59:00' | |
| action: | |
| - service: switch.turn_on | |
| entity_id: | |
| - switch.backyard_patio_lighting | |
| - switch.lower_backyard_lighting | |
| - service: light.turn_on | |
| entity_id: | |
| - light.backyard_patio | |
| - light.backyard_deck | |
| data: | |
| brightness_pct: 2 | |
| ########################################################## | |
| ## Set USER1 Away Driving | |
| ########################################################## | |
| - alias: Location - Set USER1 Away Driving | |
| id: 'location_set_USER1_away_driving' | |
| trigger: | |
| - platform: state | |
| entity_id: person.USER1 | |
| from: 'home' | |
| to: 'not_home' | |
| condition: | |
| - condition: state | |
| entity_id: cover.garage_door | |
| state: 'open' | |
| action: | |
| - service: homeassistant.turn_on | |
| entity_id: input_boolean.USER1_away_driving | |
| ########################################################## | |
| ## Set USER1 Away after 1 Min | |
| ########################################################## | |
| - alias: Location - Set USER1 Away after 1 Min | |
| id: 'location_set_USER1_away_after_1_min' | |
| trigger: | |
| - platform: state | |
| entity_id: person.USER1 | |
| from: 'home' | |
| to: 'not_home' | |
| for: | |
| hours: 0 | |
| minutes: 1 | |
| seconds: 0 | |
| action: | |
| - service: homeassistant.turn_on | |
| entity_id: | |
| - input_boolean.USER1_away | |
| - input_boolean.USER1_greeting | |
| ########################################################## | |
| ## Set USER1 Home after 10 Mins | |
| ########################################################## | |
| - alias: Location - Set USER1 Home after 10 Mins | |
| id: 'location_set_USER1_home_after_10_mins' | |
| trigger: | |
| - platform: state | |
| entity_id: person.USER1 | |
| from: 'not_home' | |
| to: 'home' | |
| for: | |
| hours: 0 | |
| minutes: 10 | |
| seconds: 0 | |
| action: | |
| - service: homeassistant.turn_off | |
| entity_id: | |
| - input_boolean.USER1_away | |
| - input_boolean.USER1_away_driving | |
| - input_boolean.USER1_greeting | |
| ########################################################## | |
| ## Set USER2 Away Driving | |
| ########################################################## | |
| - alias: Location - Set USER2 Away Driving | |
| id: 'location_set_USER2_away_driving' | |
| trigger: | |
| - platform: state | |
| entity_id: person.USER2 | |
| from: 'home' | |
| to: 'not_home' | |
| condition: | |
| - condition: state | |
| entity_id: cover.garage_door | |
| state: 'open' | |
| action: | |
| - service: homeassistant.turn_on | |
| entity_id: input_boolean.USER2_away_driving | |
| ########################################################## | |
| ## Set USER2 Away after 1 Min | |
| ########################################################## | |
| - alias: Location - Set USER2 Away after 1 Min | |
| id: 'location_set_USER2_away_after_1_min' | |
| trigger: | |
| - platform: state | |
| entity_id: person.USER2 | |
| from: 'home' | |
| to: 'not_home' | |
| for: | |
| hours: 0 | |
| minutes: 1 | |
| seconds: 0 | |
| action: | |
| - service: homeassistant.turn_on | |
| entity_id: | |
| - input_boolean.USER2_away | |
| - input_boolean.USER2_greeting | |
| ########################################################## | |
| ## Set USER2 Home after 10 Mins | |
| ########################################################## | |
| - alias: Location - Set USER2 Home after 10 Mins | |
| id: 'location_set_USER2_home_after_10_min' | |
| trigger: | |
| - platform: state | |
| entity_id: person.USER2 | |
| #from: 'not_home' | |
| to: 'home' | |
| for: | |
| hours: 0 | |
| minutes: 10 | |
| seconds: 0 | |
| action: | |
| - service: homeassistant.turn_off | |
| entity_id: | |
| - input_boolean.USER2_away | |
| - input_boolean.USER2_away_driving | |
| - input_boolean.USER2_greeting | |
| ################################################################# | |
| ## Notifications | |
| ################################################################# | |
| ################################################################# | |
| ## USER1 Home Driving iOS Notification | |
| ################################################################# | |
| - alias: Location - USER1 Home Driving iOS Notification | |
| id: 'location_USER1_home_driving_ios_notification' | |
| trigger: | |
| - platform: state | |
| entity_id: person.USER1 | |
| from: 'not_home' | |
| to: 'home' | |
| condition: | |
| - condition: state | |
| entity_id: input_boolean.USER1_away | |
| state: 'on' | |
| - condition: state | |
| entity_id: input_boolean.USER1_away_driving | |
| state: 'on' | |
| - condition: state | |
| entity_id: input_boolean.disable_notifications | |
| state: 'off' | |
| action: | |
| - service: notify.mobile_app_USER1s_iphone | |
| data: | |
| message: USER1 Home | |
| data: | |
| apns_headers: | |
| 'apns-collapse-id': 'USER1-home' | |
| push: | |
| category: camera | |
| entity_id: camera.driveway | |
| - service: notify.mobile_app_USER2_s_iphone | |
| data: | |
| message: USER1 Home | |
| data: | |
| apns_headers: | |
| 'apns-collapse-id': 'USER1-home' | |
| push: | |
| category: camera | |
| entity_id: camera.driveway | |
| ################################################################# | |
| ## USER1 Home Walking iOS Notification | |
| ################################################################# | |
| - alias: Location - USER1 Home Walking iOS Notification | |
| id: 'location_USER1_home_walking_ios_notification' | |
| trigger: | |
| - platform: state | |
| entity_id: person.USER1 | |
| from: 'not_home' | |
| to: 'home' | |
| condition: | |
| - condition: state | |
| entity_id: input_boolean.USER1_away | |
| state: 'on' | |
| - condition: state | |
| entity_id: input_boolean.USER1_away_driving | |
| state: 'off' | |
| - condition: state | |
| entity_id: input_boolean.disable_notifications | |
| state: 'off' | |
| action: | |
| - service: notify.mobile_app_USER1s_iphone | |
| data: | |
| message: USER1 Home | |
| data: | |
| apns_headers: | |
| 'apns-collapse-id': 'USER1-home' | |
| push: | |
| category: camera | |
| entity_id: camera.front_porch | |
| - service: notify.mobile_app_USER2_s_iphone | |
| data: | |
| message: USER1 Home | |
| data: | |
| apns_headers: | |
| 'apns-collapse-id': 'USER1-home' | |
| push: | |
| category: camera | |
| entity_id: camera.front_porch | |
| ################################################################# | |
| ## USER1 Away iOS Notification | |
| ################################################################# | |
| - alias: Location - USER1 Away iOS Notification | |
| id: 'location_USER1_away_ios_notification' | |
| trigger: | |
| - platform: state | |
| entity_id: person.USER1 | |
| from: 'home' | |
| to: 'not_home' | |
| condition: | |
| - condition: state | |
| entity_id: input_boolean.disable_notifications | |
| state: 'off' | |
| action: | |
| - service: notify.mobile_app_USER1s_iphone | |
| data: | |
| message: USER1 Away | |
| data: | |
| apns_headers: | |
| 'apns-collapse-id': 'USER1-away' | |
| ################################################################# | |
| ## USER2 Home Driving iOS Notification | |
| ################################################################# | |
| - alias: Location - USER2 Home Driving iOS Notification | |
| id: 'location_USER2_home_driving_ios_notification' | |
| trigger: | |
| - platform: state | |
| entity_id: person.USER2 | |
| from: 'not_home' | |
| to: 'home' | |
| condition: | |
| - condition: state | |
| entity_id: input_boolean.USER2_away | |
| state: 'on' | |
| - condition: state | |
| entity_id: input_boolean.USER2_away_driving | |
| state: 'on' | |
| - condition: state | |
| entity_id: input_boolean.disable_notifications | |
| state: 'off' | |
| action: | |
| - service: notify.mobile_app_USER1s_iphone | |
| data: | |
| message: USER2 Home | |
| data: | |
| apns_headers: | |
| 'apns-collapse-id': 'USER2-home' | |
| push: | |
| category: camera | |
| entity_id: camera.driveway | |
| ################################################################# | |
| ## USER2 Home Walking iOS Notification | |
| ################################################################# | |
| - alias: Location - USER2 Home Walking iOS Notification | |
| id: 'location_USER2_home_walking_ios_notification' | |
| trigger: | |
| - platform: state | |
| entity_id: person.USER2 | |
| from: 'not_home' | |
| to: 'home' | |
| condition: | |
| - condition: state | |
| entity_id: input_boolean.USER2_away | |
| state: 'on' | |
| - condition: state | |
| entity_id: input_boolean.USER2_away_driving | |
| state: 'off' | |
| - condition: state | |
| entity_id: input_boolean.disable_notifications | |
| state: 'off' | |
| action: | |
| - service: notify.mobile_app_USER1s_iphone | |
| data: | |
| message: USER2 Home | |
| data: | |
| apns_headers: | |
| 'apns-collapse-id': 'USER2-home' | |
| push: | |
| category: camera | |
| entity_id: camera.front_porch | |
| ################################################################# | |
| ## USER2 Away iOS Notification | |
| ################################################################# | |
| - alias: Location - USER2 Away iOS Notification | |
| id: 'location_USER2_away_ios_notification' | |
| trigger: | |
| - platform: state | |
| entity_id: person.USER2 | |
| from: 'home' | |
| to: 'not_home' | |
| condition: | |
| - condition: state | |
| entity_id: input_boolean.disable_notifications | |
| state: 'off' | |
| action: | |
| - service: notify.mobile_app_USER1s_iphone | |
| data: | |
| message: USER2 Away | |
| data: | |
| apns_headers: | |
| 'apns-collapse-id': 'USER2-away' | |
| ################################################################# | |
| ## USER2 Left Work iOS Notification | |
| ################################################################# | |
| - alias: Location - USER2 Left Work iOS Notification | |
| id: 'location_USER2_left_work_ios_notification' | |
| trigger: | |
| - platform: state | |
| entity_id: person.USER2 | |
| from: 'REDACTED' | |
| to: 'not_home' | |
| condition: | |
| - condition: state | |
| entity_id: input_boolean.disable_notifications | |
| state: 'off' | |
| action: | |
| - service: notify.mobile_app_USER1s_iphone | |
| data: | |
| message: "USER2 has left work, ETA: {{states('sensor.USER2_to_home')}} mins" | |
| data: | |
| apns_headers: | |
| 'apns-collapse-id': 'USER2-work' | |
| ########################################################## | |
| ## Welcome Home USER1 Audio Greeting | |
| ########################################################## | |
| - alias: Location - Welcome Home USER1 Audio Greeting | |
| id: 'location_welcome_home_USER1_audio_greeting' | |
| trigger: | |
| - platform: state | |
| entity_id: group.doors | |
| from: 'off' | |
| to: 'on' | |
| condition: | |
| - condition: state | |
| entity_id: person.USER1 | |
| state: 'home' | |
| - condition: state | |
| entity_id: input_boolean.USER1_greeting | |
| state: 'on' | |
| - condition: state | |
| entity_id: input_boolean.disable_notifications | |
| state: 'off' | |
| - condition: time | |
| after: '09:00:00' | |
| before: '22:00:00' | |
| - condition: or | |
| conditions: | |
| - condition: state | |
| entity_id: media_player.sonos_living_room | |
| state: 'idle' | |
| - condition: state | |
| entity_id: media_player.sonos_dining_room | |
| state: 'idle' | |
| - condition: state | |
| entity_id: media_player.sonos_kitchen | |
| state: 'idle' | |
| action: | |
| - delay: '00:00:04' | |
| - service: script.turn_on | |
| entity_id: script.say | |
| data: | |
| variables: | |
| master: 'media_player.sonos_living_room' | |
| where: 'media_player.sonos_living_room, media_player.sonos_dining_room, media_player.sonos_kitchen' | |
| volume: 0.5 | |
| what: 'Welcome home, USER1.' | |
| - delay: '00:02:00' | |
| - service: homeassistant.turn_off | |
| entity_id: input_boolean.USER1_greeting | |
| ########################################################## | |
| ## Notify USER2s Office that USER1 is Home | |
| ########################################################## | |
| - alias: Location - Notify USER2s Office that USER1 is Home | |
| id: 'location_notify_USER2s_office_that_USER1_is_home' | |
| trigger: | |
| - platform: state | |
| entity_id: group.doors | |
| from: 'off' | |
| to: 'on' | |
| condition: | |
| - condition: state | |
| entity_id: person.USER1 | |
| state: 'home' | |
| - condition: state | |
| entity_id: person.USER2 | |
| state: 'home' | |
| - condition: state | |
| entity_id: input_boolean.USER1_greeting | |
| state: 'on' | |
| - condition: state | |
| entity_id: input_boolean.USER2_greeting | |
| state: 'off' | |
| - condition: state | |
| entity_id: binary_sensor.USER2_office_occupancy | |
| state: 'on' | |
| - condition: state | |
| entity_id: input_boolean.disable_notifications | |
| state: 'off' | |
| - condition: time | |
| after: '09:00:00' | |
| before: '22:00:00' | |
| - condition: state | |
| entity_id: media_player.sonos_USER2s_office | |
| state: 'idle' | |
| action: | |
| - delay: '00:00:60' | |
| - service: script.turn_on | |
| entity_id: script.say | |
| data: | |
| variables: | |
| master: 'media_player.sonos_USER2s_office' | |
| where: 'media_player.sonos_USER2s_office' | |
| volume: 0.5 | |
| what: 'USER1, is Home.' | |
| ########################################################## | |
| ## Welcome Home USER2 Audio Greeting | |
| ########################################################## | |
| - alias: Location - Welcome Home USER2 Audio Greeting | |
| id: 'location_welcome_home_USER2_audio_greeting' | |
| trigger: | |
| - platform: state | |
| entity_id: group.doors | |
| from: 'off' | |
| to: 'on' | |
| condition: | |
| - condition: state | |
| entity_id: person.USER2 | |
| state: 'home' | |
| - condition: state | |
| entity_id: input_boolean.USER2_greeting | |
| state: 'on' | |
| - condition: state | |
| entity_id: input_boolean.disable_notifications | |
| state: 'off' | |
| - condition: time | |
| after: '09:00:00' | |
| before: '22:00:00' | |
| - condition: or | |
| conditions: | |
| - condition: state | |
| entity_id: media_player.sonos_living_room | |
| state: 'idle' | |
| - condition: state | |
| entity_id: media_player.sonos_dining_room | |
| state: 'idle' | |
| - condition: state | |
| entity_id: media_player.sonos_kitchen | |
| state: 'idle' | |
| action: | |
| - delay: '00:00:04' | |
| - service: script.turn_on | |
| entity_id: script.say | |
| data: | |
| variables: | |
| master: 'media_player.sonos_living_room' | |
| where: 'media_player.sonos_living_room, media_player.sonos_dining_room, media_player.sonos_kitchen' | |
| volume: 0.5 | |
| what: 'Welcome home, USER2.' | |
| - delay: '00:02:00' | |
| - service: homeassistant.turn_off | |
| entity_id: input_boolean.USER2_greeting | |
| ########################################################## | |
| ## Notify USER1s Office that USER2 is Home | |
| ########################################################## | |
| - alias: Location - Notify USER1s Office that USER2 is Home | |
| id: 'location_notify_USER1s_office_that_USER2_is_home' | |
| trigger: | |
| - platform: state | |
| entity_id: group.doors | |
| from: 'off' | |
| to: 'on' | |
| condition: | |
| - condition: state | |
| entity_id: person.USER1 | |
| state: 'home' | |
| - condition: state | |
| entity_id: person.USER2 | |
| state: 'home' | |
| - condition: state | |
| entity_id: input_boolean.USER1_greeting | |
| state: 'off' | |
| - condition: state | |
| entity_id: input_boolean.USER2_greeting | |
| state: 'on' | |
| - condition: state | |
| entity_id: binary_sensor.office_occupancy | |
| state: 'on' | |
| - condition: state | |
| entity_id: input_boolean.disable_notifications | |
| state: 'off' | |
| - condition: time | |
| after: '09:00:00' | |
| before: '22:00:00' | |
| - condition: or | |
| conditions: | |
| - condition: state | |
| entity_id: media_player.sonos_USER1s_office | |
| state: 'idle' | |
| - condition: state | |
| entity_id: media_player.sonos_USER1s_office_move | |
| state: 'idle' | |
| action: | |
| - delay: '00:00:60' | |
| - service: script.turn_on | |
| entity_id: script.say | |
| data: | |
| variables: | |
| master: 'media_player.sonos_USER1s_office' | |
| where: 'media_player.sonos_USER1s_office, media_player.sonos_USER1s_office_move' | |
| volume: 0.5 | |
| what: 'USER2, is Home' | |
| ########################################################## | |
| ## Welcome Home USER1 and USER2 Audio Greeting | |
| ########################################################## | |
| - alias: Location - Welcome Home USER1 and USER2 Audio Greeting | |
| id: 'location_welcome_home_USER1_and_USER2_audio_greeting' | |
| trigger: | |
| - platform: state | |
| entity_id: group.doors | |
| from: 'off' | |
| to: 'on' | |
| condition: | |
| - condition: state | |
| entity_id: person.USER1 | |
| state: 'home' | |
| - condition: state | |
| entity_id: person.USER2 | |
| state: 'home' | |
| - condition: state | |
| entity_id: input_boolean.USER1_greeting | |
| state: 'on' | |
| - condition: state | |
| entity_id: input_boolean.USER2_greeting | |
| state: 'on' | |
| - condition: state | |
| entity_id: input_boolean.disable_notifications | |
| state: 'off' | |
| - condition: time | |
| after: '09:00:00' | |
| before: '22:00:00' | |
| - condition: or | |
| conditions: | |
| - condition: state | |
| entity_id: media_player.sonos_living_room | |
| state: 'idle' | |
| - condition: state | |
| entity_id: media_player.sonos_dining_room | |
| state: 'idle' | |
| - condition: state | |
| entity_id: media_player.sonos_kitchen | |
| state: 'idle' | |
| action: | |
| - delay: '00:00:03' | |
| - service: script.turn_on | |
| entity_id: script.say | |
| data: | |
| variables: | |
| master: 'media_player.sonos_living_room' | |
| where: 'media_player.sonos_living_room, media_player.sonos_dining_room, media_player.sonos_kitchen' | |
| volume: 0.5 | |
| what: 'Welcome Home, USER1 and USER2' | |
| - delay: '00:02:00' | |
| - service: homeassistant.turn_off | |
| entity_id: input_boolean.USER1_greeting, input_boolean.USER2_greeting | |
| ################################################################# | |
| ## USER2 Left Work Audio Notification | |
| ################################################################# | |
| - alias: Location - USER2 Left Work Audio Notification | |
| id: 'location_USER2_left_work_audio_notification' | |
| trigger: | |
| - platform: state | |
| entity_id: person.USER2 | |
| from: 'REDACTED' | |
| to: 'not_home' | |
| condition: | |
| - condition: state | |
| entity_id: person.USER1 | |
| state: 'home' | |
| - condition: state | |
| entity_id: person.USER2 | |
| state: 'not_home' | |
| - condition: state | |
| entity_id: input_boolean.USER2_away | |
| state: 'on' | |
| - condition: state | |
| entity_id: input_boolean.disable_notifications | |
| state: 'off' | |
| - condition: time | |
| after: '09:00:00' | |
| before: '19:00:00' | |
| action: | |
| - service: sonos.snapshot | |
| data: | |
| with_group: yes | |
| entity_id: | |
| - media_player.sonos_living_room | |
| - media_player.sonos_dining_room | |
| - media_player.sonos_kitchen | |
| - media_player.sonos_bathroom | |
| - media_player.sonos_bedroom | |
| - media_player.sonos_USER1s_office | |
| - media_player.sonos_USER1s_office_move | |
| - delay: '00:00:03' | |
| - service: sonos.unjoin | |
| entity_id: | |
| - media_player.sonos_living_room | |
| - media_player.sonos_dining_room | |
| - media_player.sonos_kitchen | |
| - media_player.sonos_bathroom | |
| - media_player.sonos_USER1s_office | |
| - media_player.sonos_USER1s_office_move | |
| - delay: '00:00:01' | |
| - service: sonos.join | |
| data: | |
| master: media_player.sonos_USER1s_office | |
| entity_id: | |
| - media_player.sonos_living_room | |
| - media_player.sonos_dining_room | |
| - media_player.sonos_kitchen | |
| - media_player.sonos_bathroom | |
| - media_player.sonos_bedroom | |
| - media_player.sonos_USER1s_office | |
| - media_player.sonos_USER1s_office_move | |
| - delay: '00:00:01' | |
| - service: media_player.volume_set | |
| entity_id: | |
| - media_player.sonos_living_room | |
| - media_player.sonos_dining_room | |
| - media_player.sonos_kitchen | |
| - media_player.sonos_bathroom | |
| - media_player.sonos_bedroom | |
| - media_player.sonos_USER1s_office | |
| - media_player.sonos_USER1s_office_move | |
| data: | |
| volume_level: 0.6 | |
| - delay: '00:00:02' | |
| - service: tts.amazon_polly_say | |
| data_template: | |
| entity_id: media_player.sonos_USER1s_office | |
| message: "USER2 has left work, and will arrive Home in about, {{states('sensor.USER2_to_home')}} minutes" | |
| - delay: '00:00:25' | |
| - service: sonos.restore | |
| data: | |
| with_group: yes | |
| entity_id: | |
| - media_player.sonos_living_room | |
| - media_player.sonos_dining_room | |
| - media_player.sonos_kitchen | |
| - media_player.sonos_bathroom | |
| - media_player.sonos_bedroom | |
| - media_player.sonos_USER1s_office | |
| - media_player.sonos_USER1s_office_move |