2020-03-27 08:13:30 -07:00
|
|
|
input_datetime:
|
|
|
|
security_lights_interior_time_off:
|
|
|
|
has_time: true
|
2021-01-01 11:00:49 -08:00
|
|
|
# initial: '22:30'
|
2020-03-27 08:13:30 -07:00
|
|
|
|
|
|
|
#
|
|
|
|
# security_lights_interior_on_offset:
|
|
|
|
# has_time: true
|
|
|
|
# initial: ':00'
|
|
|
|
|
|
|
|
automation:
|
|
|
|
- alias: security_lights_interior_time_off
|
|
|
|
trigger:
|
|
|
|
- platform: template
|
|
|
|
value_template: "{{ states('sensor.time') == states('input_datetime.security_lights_interior_time_off')[0:5] }}"
|
|
|
|
action:
|
|
|
|
- service: switch.turn_off
|
|
|
|
data:
|
|
|
|
entity_id: group.sonoffs
|
|
|
|
|
|
|
|
- alias: security_lights_interior_time_on
|
|
|
|
trigger:
|
|
|
|
platform: sun
|
|
|
|
event: sunset
|
2020-12-08 19:58:32 -08:00
|
|
|
offset: "-00:45:00"
|
2020-03-27 08:13:30 -07:00
|
|
|
action:
|
|
|
|
- service: switch.turn_on
|
|
|
|
data:
|
|
|
|
entity_id: group.sonoffs
|