Fixes for homeassistant thermostatHeatCool (#3466)

Remove 'auto' mode for 3157100 thermostat
unit_of_measurement in JSON should be temperature_unit
This commit is contained in:
presslab-us
2020-05-02 07:47:02 -04:00
committed by GitHub
parent bf1111edcb
commit 7ae77ea528
+5 -5
View File
@@ -678,16 +678,16 @@ const thermostat = (minTemp=7, maxTemp=30, temperatureStateProperty='occupied_he
};
};
const thermostatHeatCool = /* istanbul ignore next */ (minTemp=7, maxTemp=30, tempStep=0.5, fanModes=[]) => {
const thermostatHeatCool = /* istanbul ignore next */ (minTemp=7, maxTemp=30, tempStep=0.5, opModes, fanModes=[]) => {
return {
type: 'climate',
object_id: 'climate',
discovery_payload: {
state_topic: false,
unit_of_measurement: '°C',
temperature_unit: 'C',
min_temp: `${minTemp}`,
max_temp: `${maxTemp}`,
modes: ['off', 'auto', 'heat', 'cool'],
modes: opModes,
mode_state_topic: true,
mode_state_template: '{{ value_json.system_mode }}',
mode_command_topic: true,
@@ -1535,7 +1535,7 @@ const mapping = {
'E12-N1E': [cfg.light_brightness_colortemp_colorxy],
'4040B': [cfg.sensor_power, switchEndpoint('l1'), switchEndpoint('l2')],
'3460-L': [cfg.sensor_action, cfg.sensor_temperature, cfg.sensor_battery],
'3157100': [thermostatHeatCool(10, 30, 1, ['auto', 'on']), cfg.sensor_battery],
'3157100': [thermostatHeatCool(10, 30, 1, ['off', 'heat', 'cool'], ['auto', 'on']), cfg.sensor_battery],
'4257050-RZHAC': [cfg.switch, cfg.sensor_power],
'27087-03': [cfg.switch, cfg.sensor_battery],
'99140-002': [cfg.lock, cfg.sensor_battery],
@@ -1543,7 +1543,7 @@ const mapping = {
'GL-S-004ZS': [cfg.light_brightness_colortemp_colorxy],
'7121131PU': [cfg.light_brightness_colortemp_colorxy],
'RL804QZB': [switchEndpoint('l1'), switchEndpoint('l2'), switchEndpoint('l3')],
'RC-2000WH': [thermostatHeatCool(10, 30, 1, ['auto', 'on', 'smart'])],
'RC-2000WH': [thermostatHeatCool(10, 30, 1, ['off', 'auto', 'heat', 'cool'], ['auto', 'on', 'smart'])],
'TH1300ZB': [thermostat()],
'SP 220': [cfg.switch],
'511.040': [cfg.light_brightness_colortemp_colorxy],