Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

小米温湿度计2不可用 #914

Closed
qq562934992 opened this issue Dec 3, 2022 · 9 comments
Closed

小米温湿度计2不可用 #914

qq562934992 opened this issue Dec 3, 2022 · 9 comments
Labels
bug Something isn't working device: air-monitor fixed bug fixed

Comments

@qq562934992
Copy link

qq562934992 commented Dec 3, 2022

Device model

miaomiaoce.sensor_ht.t2

Component version

0.7.2

HA core version

2022.11.4

Integrated mode

Automatic (自动模式)

The problem

小米温湿度计2添加后不可用

Entity attributes

restored: true
friendly_name: 温湿度计 Temperature Humidity Sensor
supported_features: 0

Home Assistant Logs

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/xiaomi_miot/sensor.py", line 71, in async_setup_entry
await async_setup_config_entry(hass, config_entry, async_setup_platform, async_add_entities, ENTITY_DOMAIN)
File "/config/custom_components/xiaomi_miot/init.py", line 549, in async_setup_config_entry
await async_setup_platform(hass, c, async_add_entities)
File "/config/custom_components/xiaomi_miot/sensor.py", line 123, in async_setup_platform
entities.append(MiotSensorEntity(config, srv))
File "/config/custom_components/xiaomi_miot/sensor.py", line 170, in init
self._name = f'{self.device_name} {self._prop_state.friendly_desc}'
AttributeError: 'NoneType' object has no attribute 'friendly_desc'

@al-one al-one added device: air-monitor bug Something isn't working labels Dec 6, 2022
@al-one
Copy link
Owner

al-one commented Dec 6, 2022

更新至master分支后重试。

@qq562934992
Copy link
Author

更新至master分支后重试。

master分支已正常使用

@qq562934992
Copy link
Author

更新至master分支后重试。

单独添加时温湿度计2时可以正常使用,后续添加其他设备后,温湿度计变为不可用,日志显示相同的错误。与其他设备一起添加时,设备中没有温湿度计设备。并且显示相同的错误日志。

@al-one
Copy link
Owner

al-one commented Dec 6, 2022

粘贴日志

@qq562934992
Copy link
Author

粘贴日志
Logger: homeassistant.components.sensor
Source: custom_components/xiaomi_miot/sensor.py:170
Integration: 传感器 (documentation, issues)
First occurred: 15:12:56 (2 occurrences)
Last logged: 15:22:00

Error while setting up xiaomi_miot platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/xiaomi_miot/sensor.py", line 71, in async_setup_entry
await async_setup_config_entry(hass, config_entry, async_setup_platform, async_add_entities, ENTITY_DOMAIN)
File "/config/custom_components/xiaomi_miot/init.py", line 549, in async_setup_config_entry
await async_setup_platform(hass, c, async_add_entities)
File "/config/custom_components/xiaomi_miot/sensor.py", line 123, in async_setup_platform
entities.append(MiotSensorEntity(config, srv))
File "/config/custom_components/xiaomi_miot/sensor.py", line 170, in init
self._name = f'{self.device_name} {self._prop_state.friendly_desc}'
AttributeError: 'NoneType' object has no attribute 'friendly_desc'

@al-one
Copy link
Owner

al-one commented Dec 6, 2022

master分支没有更新成功,请重新更新。

@qq562934992
Copy link
Author

master分支没有更新成功,请重新更新。

hacs选择master版本下载,下载下来mainfest.json的版本还是0.7.2的,是我更新的方式不对吗

@al-one
Copy link
Owner

al-one commented Dec 6, 2022

HACS在选择master版本后,需等待版本下拉框变亮再点击下载。

@qq562934992
Copy link
Author

下拉框变亮再点击下

已正常!!谢谢!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working device: air-monitor fixed bug fixed
Projects
None yet
Development

No branches or pull requests

2 participants