blueprints/automation/motion-light.yaml aktualisiert
This commit is contained in:
@@ -58,13 +58,14 @@ condition:
|
||||
- alias: "Optional lux check"
|
||||
condition: template
|
||||
value_template: >
|
||||
{% set lux_entity = (inputs.lux_entity or '') %}
|
||||
{% set lux_threshold = inputs.lux_threshold | float(50) %}
|
||||
{% if lux_entity and states(lux_entity) not in ['unknown','unavailable'] %}
|
||||
{{ states(lux_entity) | float(0) < lux_threshold }}
|
||||
{% else %}
|
||||
true
|
||||
{% endif %}
|
||||
|
||||
|
||||
action:
|
||||
- alias: "Set dynamic brightness"
|
||||
variables:
|
||||
@@ -97,9 +98,6 @@ action:
|
||||
target: !input light_target
|
||||
data:
|
||||
brightness: "{{ brightness }}"
|
||||
- alias: "Turn on the light"
|
||||
service: light.turn_on
|
||||
target: !input light_target
|
||||
|
||||
- alias: "Wait until there is no motion from device"
|
||||
wait_for_trigger:
|
||||
|
||||
Reference in New Issue
Block a user