diff --git a/configs/pepe/home-assistant.nix b/configs/pepe/home-assistant.nix index c79a2b3..b8ea9fd 100644 --- a/configs/pepe/home-assistant.nix +++ b/configs/pepe/home-assistant.nix @@ -414,19 +414,20 @@ in { service = "mqtt.publish"; data_template = { topic = "zigbee2mqtt/${heater}/set"; # office - payload_template = '' - {"system_mode":"auto","current_heating_setpoint":${ - toString temperatur - }}''; - }; - }; - heater_off = heater: { - service = "mqtt.publish"; - data_template = { - topic = "zigbee2mqtt/${heater}/set"; # office - payload_template = ''{"system_mode":"off"}''; + payload_template = builtins.toJSON { + system_mode = "auto"; + current_heating_setpoint = toString temperatur; + eurotronic_host_flags.window_open = false; + }; }; }; + #heater_off = heater: { + # service = "mqtt.publish"; + # data_template = { + # topic = "zigbee2mqtt/${heater}/set"; # office + # payload_template = ''{"system_mode":"off"}''; + # }; + #}; hot = 22; cold = 14; diff --git a/configs/pepe/home-assistant/zigbee2mqtt/heater.nix b/configs/pepe/home-assistant/zigbee2mqtt/heater.nix index b327efa..963611a 100644 --- a/configs/pepe/home-assistant/zigbee2mqtt/heater.nix +++ b/configs/pepe/home-assistant/zigbee2mqtt/heater.nix @@ -64,6 +64,14 @@ in { device_class = "temperature"; value_template = "{{ value_json.local_temperature }}"; } + { + platform = "mqtt"; + name = "pi_heating_demand_${name}"; + state_topic = "zigbee2mqtt/${name}"; + availability_topic = "zigbee2mqtt/bridge/state"; + unit_of_measurement = "%"; + value_template = "{{ value_json.pi_heating_demand }}"; + } ]) allDevices); };