Fordørklokke: tænd forgang lys ved ringning hvis mørkt
This commit is contained in:
@@ -80,7 +80,30 @@
|
|||||||
- delay: 2
|
- delay: 2
|
||||||
- service: scene.turn_on
|
- service: scene.turn_on
|
||||||
entity_id: scene.before
|
entity_id: scene.before
|
||||||
|
- sequence:
|
||||||
|
- condition: template
|
||||||
|
value_template: >
|
||||||
|
{{ states('sensor.gang_sensor_illuminance') | int <
|
||||||
|
states('input_number.gang_lux_threshold') | int }}
|
||||||
|
- choose:
|
||||||
|
- conditions:
|
||||||
|
- condition: template
|
||||||
|
value_template: >
|
||||||
|
{% set t = now().strftime('%H%M') | int %}
|
||||||
|
{% if is_state('binary_sensor.arbejdsdag', 'on') %}
|
||||||
|
{{ 630 <= t < 2130 }}
|
||||||
|
{% else %}
|
||||||
|
{{ 800 <= t < 2200 }}
|
||||||
|
{% endif %}
|
||||||
|
sequence:
|
||||||
|
- service: scene.turn_on
|
||||||
|
target:
|
||||||
|
entity_id: scene.gang_bright
|
||||||
|
default:
|
||||||
|
- service: scene.turn_on
|
||||||
|
target:
|
||||||
|
entity_id: scene.gang_daempet_nat
|
||||||
|
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: '{{ trigger.payload_json.event == "SS" }}'
|
value_template: '{{ trigger.payload_json.event == "SS" }}'
|
||||||
|
|||||||
Reference in New Issue
Block a user