blueprints/automation/motion-light.yaml aktualisiert
This commit is contained in:
@@ -57,11 +57,13 @@ condition:
|
|||||||
condition: template
|
condition: template
|
||||||
value_template: >
|
value_template: >
|
||||||
{% if lux_entity %}
|
{% if lux_entity %}
|
||||||
{{ states(lux_entity) | float < lux_threshold }}
|
{% set lux_value = states(lux_entity) | float(0) %}
|
||||||
|
{{ lux_value < lux_threshold }}
|
||||||
{% else %}
|
{% else %}
|
||||||
true
|
true
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
action:
|
action:
|
||||||
- alias: "Turn on the light with calculated brightness"
|
- alias: "Turn on the light with calculated brightness"
|
||||||
service: light.turn_on
|
service: light.turn_on
|
||||||
|
|||||||
Reference in New Issue
Block a user