Removed binary_sensor.night, changed to using sunset offsets
This commit is contained in:
@ -250,28 +250,3 @@
|
|||||||
- light.living_room_lights
|
- light.living_room_lights
|
||||||
- light.mud_room_overhead
|
- light.mud_room_overhead
|
||||||
mode: single
|
mode: single
|
||||||
- alias: Set State Night
|
|
||||||
description: Set the state of binary_sensor.night accurately on HA startup
|
|
||||||
trigger:
|
|
||||||
- platform: homeassistant
|
|
||||||
event: start
|
|
||||||
action:
|
|
||||||
- choose:
|
|
||||||
- conditions:
|
|
||||||
- condition: sun
|
|
||||||
after: sunset
|
|
||||||
before_offset: -00:30
|
|
||||||
sequence:
|
|
||||||
- service: python_script.hass_entities
|
|
||||||
data:
|
|
||||||
action: set_state
|
|
||||||
entity_id: binary_sensor.night
|
|
||||||
state: 'on'
|
|
||||||
default:
|
|
||||||
- service: python_script.hass_entities
|
|
||||||
data:
|
|
||||||
action: set_state
|
|
||||||
entity_id: binary_sensor.night
|
|
||||||
state: 'off'
|
|
||||||
hide_entity: true
|
|
||||||
initial_state: 'on'
|
|
||||||
|
@ -2,11 +2,6 @@
|
|||||||
country: US
|
country: US
|
||||||
province: OH
|
province: OH
|
||||||
workdays: [mon, tue, wed, thu, fri]
|
workdays: [mon, tue, wed, thu, fri]
|
||||||
- platform: tod
|
|
||||||
name: Night
|
|
||||||
after: sunset
|
|
||||||
after_offset: "-00:30"
|
|
||||||
before: sunrise
|
|
||||||
- platform: tod
|
- platform: tod
|
||||||
name: School
|
name: School
|
||||||
after: "09:00"
|
after: "09:00"
|
||||||
|
@ -195,9 +195,9 @@ family_is_home:
|
|||||||
entity_id:
|
entity_id:
|
||||||
- switch.basement_echo_dot_do_not_disturb_switch
|
- switch.basement_echo_dot_do_not_disturb_switch
|
||||||
- switch.living_room_echo_dot_do_not_disturb_switch
|
- switch.living_room_echo_dot_do_not_disturb_switch
|
||||||
- condition: state
|
- condition: sun
|
||||||
entity_id: binary_sensor.night
|
after: sunset
|
||||||
state: 'on'
|
after_offset: -00:30
|
||||||
- service: light.turn_on
|
- service: light.turn_on
|
||||||
data: {}
|
data: {}
|
||||||
target:
|
target:
|
||||||
|
Reference in New Issue
Block a user