domoticz-zigbee2mqtt-plugin
domoticz-zigbee2mqtt-plugin copied to clipboard
Support request for TUYA-adapter TS0601_thermostat_1
Dear all,
I've added a fix to the TUYA-adapter TS0601_thermostat_1:
cd :~/dev-domoticz/plugins/zigbee2mqtt/adapters/tuya sudo nano TS0601.py Add the lines with '>':
self.devices.append(mode_switch)
self.devices.append(preset)
self.devices.append(week_format)
self.devices.append(SetPoint('spoint', 'current_heating_setpoint',' (Setpoint)'))
self.devices.append(SetPoint('sp_eco', 'eco_temperature',' (Eco Setpoint)'))
self.devices.append(SetPoint('sp_cmf', 'comfort_temperature',' (Comfort Setpoint)'))
self.devices.append(TemperatureSensor('temp', 'local_temperature',' (Temperature)'))
self.devices.append(LevelSwitch('level', 'position', ' (Valve position)'))
self.devices.append(OnOffSwitch('wnd', 'window_detection', ' (Window Detection)'))
self.devices.append(OnOffSwitch('child', 'child_lock', ' (Child Lock)'))
> self.devices.append(OnOffSwitch('wndstate', 'window', ' (Window State)'))
> self.devices.append(SetPoint('maxtemp', 'max_temperature', ' (Maximum Temperature)'))
> self.devices.append(SetPoint('mintemp', 'min_temperature', ' (Minimum Temperature)'))
> self.devices.append(OnOffSwitch('heatstate', 'heating', ' (Heating State)'))
> self.devices.append(OnOffSwitch('heatbst', 'boost_heating', ' (Boost Heating)'))
> self.devices.append(SetPoint('heatbstcnt', 'boost_heating_countdown', ' (Boost Heating Countdown)'))
sudo nano init.py Add the line with '>':
tuya_adapters = {
'TS0002': TS0002, # TuYa 2 gang switch
'TS0012': TS0012, # TuYa Smart light switch - 2 gang without neutral wire
'TS0013': TS0013, # TuYa Smart light switch - 3 gang without neutral wire
'TS0015': TS0015, # TuYa Multiprise with 4 AC outlets and 2 USB super charging ports (10A or 16A)
'TS0601_thermostat': TS0601, # TuYa Radiator valve with thermostat
> 'TS0601_thermostat_1': TS0601, # TuYa Radiator valve with thermostat
}
sudo service domoticz restart
Then it works like a charm!
Hopefully, Stanislav could add these fix to the code.
Many thanks in advance, Wolly