Make thermostat more like thermostatHeatCool (#3613)

* Make thermostat more like thermostatHeatCool

This change tries to unify the two thermostat templates a little.
I'm making this change because I wanted to enable tracking the current
state of the Zen thermostat and noticed that the logic was very specific
to a subset of thermostats.

The matching change in zigbee-herdsman-converters ensures that the
thermostats that were sending the "operation" field use the new format
and should effectively behave the same after the change.

* 0.5 degree steps for Zen thermostat

Because it supports it.
This commit is contained in:
Jonas Bergler 2020-05-28 02:26:55 +12:00 committed by GitHub
parent 780246fe74
commit d5604ab5ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -696,7 +696,9 @@ const thermostat = (minTemp=7, maxTemp=30, temperatureStateProperty='occupied_he
temperature_command_topic: temperatureStateProperty,
temp_step: tempStep,
action_topic: true,
action_template: '{{ value_json.operation }}',
action_template:
'{% set values = {\'idle\':\'off\',\'heat\':\'heating\',\'cool\':\'cooling\',\'fan only\':\'fan\'}'+
' %}{{ values[value_json.running_state] }}',
},
};
};
@ -1247,7 +1249,7 @@ const mapping = {
'TH1124ZB': [thermostat()],
'TH1400ZB': [thermostat()],
'TH1500ZB': [thermostat()],
'Zen-01-W': [thermostat()],
'Zen-01-W': [thermostat(10, 30, 'occupied_heating_setpoint', 0.5)],
'9290022166': [cfg.light_brightness_colortemp_colorxy],
'PM-C140-ZB': [cfg.sensor_power, cfg.switch],
'PM-B530-ZB': [cfg.sensor_power, cfg.switch],