diff --git a/blueprints/automation/motion-light.yaml b/blueprints/automation/motion-light.yaml index 829873f..dcd5650 100644 --- a/blueprints/automation/motion-light.yaml +++ b/blueprints/automation/motion-light.yaml @@ -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: