I recently bought a Tesla Model Y and thought I should try the integration with Domoticz. All did go well until the start of the new hardware were I met the following error:
Code: Select all
2024-07-16 10:13:47.938 Status: Tesla: Started.
2024-07-16 10:13:48.387 Status: Tesla: Initialized version 0.8.1, author 'Jan-Jaap Kostelijk'
2024-07-16 10:13:48.389 Tesla: Plugin starting
2024-07-16 10:13:48.392 Tesla: Starting version: 0.8.1
2024-07-16 10:13:49.018 Error: Tesla: Call to function 'onStart' failed, exception details:
2024-07-16 10:13:49.020 Error: Tesla: Traceback (most recent call last):
2024-07-16 10:13:49.020 Error: Tesla: File "/home/pi/domoticz/plugins/TeslaDomoticz/plugin.py", line 380, in onStart
2024-07-16 10:13:49.020 Error: Tesla: _plugin.onStart()
2024-07-16 10:13:49.020 Error: Tesla: File "/home/pi/domoticz/plugins/TeslaDomoticz/plugin.py", line 172, in onStart
2024-07-16 10:13:49.020 Error: Tesla: self.updateDevices(self.vehicle_dict[vehicle['vin']])
2024-07-16 10:13:49.020 Error: Tesla: File "/home/pi/domoticz/plugins/TeslaDomoticz/plugin.py", line 305, in updateDevices
2024-07-16 10:13:49.020 Error: Tesla: UpdateDeviceEx(deviceId, 2, vehicle.battery_range, "{:.1f}".format(vehicle.battery_range)) # range
2024-07-16 10:13:49.020 Error: Tesla: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-16 10:13:49.020 Error: Tesla: File "/home/pi/domoticz/plugins/TeslaDomoticz/plugin.py", line 451, in UpdateDeviceEx
2024-07-16 10:13:49.020 Error: Tesla: Devices[Device].Units[Unit].nValue = nValue
2024-07-16 10:13:49.020 Error: Tesla: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-16 10:13:49.020 Error: Tesla: TypeError: 'float' object cannot be interpreted as an integer
Code: Select all
Devices[Device].Units[Unit].nValue = int(nValue)
Can you explain this and help me further?
Thanks, Mark