From 4334e01759890e6d288ae0b8d2fddac3d0a9d889 Mon Sep 17 00:00:00 2001 From: Timo S Date: Fri, 13 Dec 2019 19:00:02 +0100 Subject: [PATCH] temp_step attribute for climate entities (#2515) --- lib/extension/homeassistant.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/extension/homeassistant.js b/lib/extension/homeassistant.js index 3c6b408a..d7604b28 100644 --- a/lib/extension/homeassistant.js +++ b/lib/extension/homeassistant.js @@ -377,7 +377,7 @@ const cfg = { }, // Thermostat/HVAC - 'thermostat': (minTemp=7, maxTemp=30, temperatureStateProperty='occupied_heating_setpoint') => { + 'thermostat': (minTemp=7, maxTemp=30, temperatureStateProperty='occupied_heating_setpoint', tempStep=1) => { return { type: 'climate', object_id: 'climate', @@ -394,6 +394,7 @@ const cfg = { temperature_state_topic: true, temperature_state_template: `{{ value_json.${temperatureStateProperty} }}`, temperature_command_topic: temperatureStateProperty, + temp_step: tempStep, }, }; }, @@ -649,7 +650,7 @@ const mapping = { '4090130P7': [cfg.light_brightness_colortemp_colorxy], '100.110.39': [cfg.light_brightness_colortemp_colorxy], 'TI0001': [switchWithPostfix('left'), switchWithPostfix('right')], - 'SPZB0001': [cfg.thermostat(5, 30, 'current_heating_setpoint'), cfg.sensor_battery], + 'SPZB0001': [cfg.thermostat(5, 30, 'current_heating_setpoint', 0.5), cfg.sensor_battery], 'HS3CG': [cfg.binary_sensor_gas], '81825': [cfg.sensor_action], 'Z809AF': [cfg.switch, cfg.sensor_power],