- 积分
- 498
- 金钱
- 456
- 威望
- 0
- 贡献
- 0
- HASS币
- 0
中级会员
- 积分
- 498
- 金钱
- 456
- HASS币
- 0
|
发表于 2021-10-12 10:45:02
|
显示全部楼层
2021-10-12 10:43:31 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform tuya_v2.sensor: Platform not found (cannot import name 'STATE_CLASS_TOTAL_INCREASING' from 'homeassistant.components.sensor' (/usr/src/homeassistant/homeassistant/components/sensor/__init__.py)).
2021-10-12 10:43:33 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up tuya_v2 platform for binary_sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/tuya_v2/binary_sensor.py", line 95, in async_setup_entry
await async_discover_device(device_ids)
File "/config/custom_components/tuya_v2/binary_sensor.py", line 82, in async_discover_device
entities = await hass.async_add_executor_job(_setup_entities, hass, dev_ids)
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/tuya_v2/binary_sensor.py", line 123, in _setup_entities
TuyaHaBSensor(
File "/config/custom_components/tuya_v2/binary_sensor.py", line 259, in __init__
self._attr_unique_id = f"{super().unique_id}{self._code}"
File "/config/custom_components/tuya_v2/base.py", line 41, in unique_id
return f"ty{self.tuya_device.id}"
AttributeError: 'TuyaHaBSensor' object has no attribute 'tuya_device'
进行涂鸦2.0集成的时候报错了,请帮忙看一下. |
|