From 4d186d04b5945a9c06c45cbab9c5d6c3e0b889e7 Mon Sep 17 00:00:00 2001 From: Joe Mou Date: Mon, 6 Jul 2026 03:06:10 -0400 Subject: HA: Legacy switch template deprecation --- hostnix/elmo/home-assistant.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'hostnix') diff --git a/hostnix/elmo/home-assistant.nix b/hostnix/elmo/home-assistant.nix index fa1d2fa..d17c41b 100644 --- a/hostnix/elmo/home-assistant.nix +++ b/hostnix/elmo/home-assistant.nix @@ -102,13 +102,13 @@ in brightness_mode_time_light = 3 * 60 * 60; }; - switch = [ + template = [ { - platform = "template"; - switches = { - midea_cool = { + switch = [ + { unique_id = "switch_midea_cool"; - value_template = "{{ is_state('climate.air_conditioner_1', 'cool') and state_attr('climate.air_conditioner_1', 'temperature')|float < 72 }}"; + name = "midea_cool"; + state = "{{ is_state('climate.air_conditioner_1', 'cool') and state_attr('climate.air_conditioner_1', 'temperature')|float < 72 }}"; turn_on = [ { service = "climate.set_temperature"; @@ -120,8 +120,8 @@ in } ]; turn_off = [ (ha.action.off "climate.air_conditioner_1") ]; - }; - }; + } + ]; } ]; -- cgit v1.3.1