bathroom_light: trust switchbot if more recently updated
All checks were successful
flake / flake (push) Successful in 1m13s

This commit is contained in:
Jake Hillion 2024-08-30 15:25:52 +01:00 committed by JakeHillion
parent 5cef32cf1e
commit 264799952e

View File

@ -115,7 +115,7 @@ in
lights = { lights = {
bathroom_light = { bathroom_light = {
unique_id = "87a4cbb5-e5a7-44fd-9f28-fec2d6a62538"; unique_id = "87a4cbb5-e5a7-44fd-9f28-fec2d6a62538";
value_template = "{{ states('sensor.bathroom_motion_sensor_illuminance_lux') | int > 500 }}"; value_template = "{{ false if state_attr('script.bathroom_light_switch_if_on', 'last_triggered') > states.sensor.bathroom_motion_sensor_illuminance_lux.last_reported else states('sensor.bathroom_motion_sensor_illuminance_lux') | int > 500 }}";
turn_on = { service = "script.noop"; }; turn_on = { service = "script.noop"; };
turn_off = { service = "script.bathroom_light_switch_if_on"; }; turn_off = { service = "script.bathroom_light_switch_if_on"; };
}; };