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

soocare.toothbrush.1501 和yunmi.scales.ms103 无法正常接入ha #1970

Closed
WillionFe opened this issue Nov 24, 2024 · 3 comments
Closed

soocare.toothbrush.1501 和yunmi.scales.ms103 无法正常接入ha #1970

WillionFe opened this issue Nov 24, 2024 · 3 comments

Comments

@WillionFe
Copy link

Device model / 设备型号

soocare.toothbrush.1501 和yunmi.scales.ms103

Component version / 插件版本

0.7.24

HA core version / HA版本

2024.10.4

Integrated mode / 集成方式

Automatic (自动模式)

The problem / 问题详情

1、soocare.toothbrush.1501 小米电动牙刷T501可以接入,但无法获取电量数据,显示如下:
传感器

Battery Level
不可用

Battery Level event
start

Battery Level timestamp
1970-01-01T08:00:00+08:00
2、yunmi.scales.ms103 小米体脂秤S400无法接入

Entity attributes / 实体属性

1、sensor.soocare_1501_5500_battery
unavailable
状态属性:
state_class: measurement
unit_of_measurement: "%"
device_class: battery
friendly_name: Mi Smart Electric Toothbrush T501 Battery Level
supported_features: 0
2、yunmi.scales.ms103 无实体

Home Assistant Logs / 系统日志

home-assistant_2024-11-24T06-39-12.599Z.log

@al-one
Copy link
Owner

al-one commented Nov 25, 2024

ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 1047, in _async_update_entity_states
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 960, in async_update_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1130, in _async_write_ha_state
self.__async_calculate_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1067, in __async_calculate_state
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1011, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 542, in state
value = self.native_value
^^^^^^^^^^^^^^^^^
File "/config/custom_components/xiaomi_miot/sensor.py", line 322, in native_value
if not prop.range_min() <= val <= prop.range_max():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '<=' not supported between instances of 'int' and 'NoneType'

  • soocare.toothbrush.1501 电量传感器已修复,更新master分支尝试
  • yunmi.scales.ms103 暂不支持

@WillionFe
Copy link
Author

Device model / 设备型号

soocare.toothbrush.1501 和yunmi.scales.ms103

Component version / 插件版本

0.7.25

HA core version / HA版本

2024.11.3

Integrated mode / 集成方式

Automatic (自动模式)

The problem / 问题详情

1、soocare.toothbrush.1501 小米电动牙刷T501可以接入,依旧无法获取电量数据,显示如下:
传感器

Battery Level
unknown

Battery Level event
start

Battery Level timestamp
1970-01-01T08:00:00+08:00

Entity attributes / 实体属性
sensor.soocare_1501_5500_battery
状态:
unknown
状态属性:
state_class: measurement
model: soocare.toothbrush.1501
lan_ip: ""
mac_address: 00:E0:4C:F7:55:00
entity_class: MiotSensorEntity
home_room: 江城 宿舍
miot_type: urn:miot-spec-v2:device:toothbrush:0000A07E:soocare-1501:1
state_property: battery_level
battery_level.error: "-704010000 Unknown"
battery.charging_state.error: "-704010000 Unknown"
brush_head_left_level-4-1041.error: "-704010000 Unknown"
state_updater: cloud
event: start
counter: 0
timestamp: "1970-01-01T08:00:00+08:00"
sub_entities:

@al-one
Copy link
Owner

al-one commented Dec 4, 2024

battery_level.error: "-704010000 Unknown"

小米云端接口报错,无能为力

@al-one al-one closed this as not planned Won't fix, can't repro, duplicate, stale Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants