|
|
|
@ -55,15 +55,17 @@ action:
|
|
|
|
brightness: 255
|
|
|
|
brightness: 255
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
alias: 'Autoadjust Bedroom Lights After Sunset'
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
|
|
|
|
- platform: numeric_state
|
|
|
|
# Template Binary Sensors
|
|
|
|
entity_id: light.bedroom_light_1
|
|
|
|
platform: template
|
|
|
|
value_template: '{{ state.attributes.brightness }}'
|
|
|
|
sensors:
|
|
|
|
above: 140
|
|
|
|
flood_sensor:
|
|
|
|
condition:
|
|
|
|
value_template: >-
|
|
|
|
condition: state
|
|
|
|
{% if states.sensor.everspring_st812_flood_detector_flood_2_5.state == '255' %}
|
|
|
|
entity_id: sun.sun
|
|
|
|
'on'
|
|
|
|
state: below_horizon
|
|
|
|
{% elif states.sensor.everspring_st812_flood_detector_flood_2_5.state == '0' %}
|
|
|
|
action:
|
|
|
|
'off'
|
|
|
|
- service: script.bedroom_lights_fade_down_to_50_percent
|
|
|
|
{% else %}
|
|
|
|
|
|
|
|
n/a
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
|