Logger: homeassistant.components.sensor
Source: custom_components/mi_water_purifier/sensor.py:59
Integration: 传感器 (documentation, issues)
First occurred: 00:41:38 (1 occurrences)
Last logged: 00:41:38
Error while setting up mi_water_purifier platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 320, in _async_setup_platform
await asyncio.shield(task)
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/mi_water_purifier/sensor.py", line 37, in setup_platform
devices.append(XiaomiWaterPurifierSensor(waterPurifier, TAP_WATER_QUALITY, unique_id))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/mi_water_purifier/sensor.py", line 59, in __init__
self._attr_unique_id = unique_id + '_' + data_key['key']
~~~~~~~~~~^~~~~
TypeError: unsupported operand type(s) for +: 'int' and 'str'