Closed JL-Dive closed 2 years ago
I doubt if this supposed to be marked as a new feature or as a bug. I experience the same issue but the information in MQTT is correct. It is the processing of the data that fails somewhere. The model type TS0601_thermostat contains the same items that doesn't fail. I encounter similar issues with climate sensor "lumi.sensor_motion.aq2", as well.
Finaly found how to correct error in lever_switch.py:
import domoticz from devices.device import Device class LevelSwitch(Device): def create_device(self, unit, device_id, device_name): return domoticz.create_device(Unit=unit, DeviceID=device_id, Name=device_name, Type=244, Subtype=73, Switchtype=7) def get_numeric_value(self, value, device): return 1 if float(value) > 0 else 0 def get_string_value(self, value, device): return str(value)
Thanx for the trick. Probably, the change need to be taken into account in the GIT, otherwise we'll have to fix it every update.
solved by last update position as %
please add support for :
Feature description Modèle Zigbee:TS0601 Constructeur Zigbee:_TZE200_a4bpgplm Description:Thermostatic radiator valve Supporté:Supporté Constructeur:TuYa Modèle:TS0601_thermostat_1
Feature definition { "battery": 43, "boost_heating": "OFF", "child_lock": "UNLOCK", "current_heating_setpoint": "18.0", "friday_schedule": " 6h:0m 20°C, 12h:0m 15°C, 18h:0m 22°C, 22h:0m 15°C ", "heating": "OFF", "linkquality": 18, "local_temperature": "20.6", "local_temperature_calibration": "-1.0", "max_temperature": "30.0", "min_temperature": "5.0", "monday_schedule": " 6h:0m 20°C, 12h:0m 15°C, 18h:0m 22°C, 22h:0m 15°C ", "position": "0.0", "preset": "manual", "saturday_schedule": " 6h:0m 20°C, 12h:0m 15°C, 18h:0m 22°C, 22h:0m 15°C ", "sunday_schedule": " 6h:0m 20°C, 12h:0m 15°C, 18h:0m 22°C, 22h:0m 15°C ", "thursday_schedule": " 6h:0m 20°C, 12h:0m 15°C, 18h:0m 22°C, 22h:0m 15°C ", "tuesday_schedule": " 6h:0m 20°C, 12h:0m 15°C, 18h:0m 22°C, 22h:0m 15°C ", "wednesday_schedule": " 6h:0m 20°C, 12h:0m 15°C, 18h:0m 22°C, 22h:0m 15°C ", "window": "CLOSED", "window_detection": "OFF" }
actual err in my log:
caused by position: need to convert to float as it s 0.0? 2021-12-28 09:36:52.494 Error: Z2M: Exception traceback: 2021-12-28 09:36:52.494 Error: Z2M: ----> Line 298 in '/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py', function onMessage 2021-12-28 09:36:52.494 Error: Z2M: ----> Line 137 in '/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py', function onMessage 2021-12-28 09:36:52.494 Error: Z2M: ----> Line 167 in '/home/pi/domoticz/plugins/zigbee2mqtt/mqtt.py', function onMessage 2021-12-28 09:36:52.494 Error: Z2M: ----> Line 214 in '/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py', function onMQTTPublish 2021-12-28 09:36:52.494 Error: Z2M: ----> Line 61 in '/home/pi/domoticz/plugins/zigbee2mqtt/devices_manager.py', function handle_mqtt_message 2021-12-28 09:36:52.494 Error: Z2M: ----> Line 64 in '/home/pi/domoticz/plugins/zigbee2mqtt/adapters/base_adapter.py', function handle_mqtt_message 2021-12-28 09:36:52.494 Error: Z2M: ----> Line 193 in '/home/pi/domoticz/plugins/zigbee2mqtt/devices/device.py', function handle_message 2021-12-28 09:36:52.494 Error: Z2M: ----> Line 171 in '/home/pi/domoticz/plugins/zigbee2mqtt/devices/device.py', function get_device_args 2021-12-28 09:36:52.494 Error: Z2M: ----> Line 10 in '/home/pi/domoticz/plugins/zigbee2mqtt/devices/switch/level_switch.py', function get_numeric_value
could you add or ignore them?
2021-12-28 09:37:14.105 Error: Z2M: Valve-1: can not process numeric item "max_temperature" 2021-12-28 09:37:14.106 Error: Z2M: Valve-1_A: can not process numeric item "min_temperature" 2021-12-28 09:37:14.106 Error: Z2M: Valve-1_A: can not process binary item "window" 2021-12-28 09:37:14.106 Error: Z2M: Valve-1_A: can not process binary item "heating" 2021-12-28 09:37:14.107 Error: Z2M: Valve-1: can not process binary item "boost_heating" 2021-12-28 09:37:14.107 Error: Z2M: Valve-1: can not process numeric item "boost_heating_countdown"
thx