From 3f829236a28a2cdd31b72b4a987ac59aa03f4db6 Mon Sep 17 00:00:00 2001 From: Jake Hillion Date: Sat, 25 May 2024 17:02:35 +0100 Subject: [PATCH] homeassistant: read bathroom light status from motion sensor --- modules/services/homeassistant.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/services/homeassistant.nix b/modules/services/homeassistant.nix index 7cf9de1..3f3977e 100644 --- a/modules/services/homeassistant.nix +++ b/modules/services/homeassistant.nix @@ -114,7 +114,7 @@ in lights = { bathroom_light = { unique_id = "87a4cbb5-e5a7-44fd-9f28-fec2d6a62538"; - value_template = "on"; + value_template = "{{ states('sensor.bathroom_motion_sensor_illuminance_lux') | int > 500 }}"; turn_on = { service = "script.noop"; }; turn_off = { service = "switch.turn_on";