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

易来浴霸灯频频在未知和可用状态间切换 #2250

Open
chenvd opened this issue Dec 30, 2024 · 3 comments
Open

易来浴霸灯频频在未知和可用状态间切换 #2250

chenvd opened this issue Dec 30, 2024 · 3 comments

Comments

@chenvd
Copy link

chenvd commented Dec 30, 2024

Device model / 设备型号

yeelink.bhf_light.v6

Component version / 插件版本

1.0.7

HA core version / HA版本

2024.12.5

Integrated mode / 集成方式

Automatic (自动模式)

The problem / 问题详情

易来浴霸灯频频在可用和未知状态间切换,大概几十秒一次,我不太确定抓的日志是不是相关的,如果需要补充信息请告诉我,谢谢

image

Entity attributes / 实体属性

info: 浴霸
model: yeelink.bhf_light.v6
did: 
mac: 
lan_ip: 10.1.1.16
app_link: mihome://device?uid=&did=
miot_type: urn:miot-spec-v2:device:bath-heater:0000A028:yeelink-v6:2
available: true
home_room: 我的家 卫生间
icon: mdi:information
updater: local
updated_at: 2024-12-30 08:43:40.503925+08:00
ptc_bath_heater.mode: 0
target_temperature-3-2: 35
ptc_bath_heater.fan_level: 1
light.on: false
light.mode: 1
ptc_bath_heater.temperature: 19
ptc_bath_heater.heat_mode: prop_err
ptc_bath_heater.cold_mode: prop_err
ptc_bath_heater.vent_mode: prop_err
light.brightness: 100
state_updater: local
converters: button.info, light.light.on, light.brightness, light.mode, sensor.ptc_bath_heater.temperature, number.target_temperature-3-2, select.ptc_bath_heater.heat_mode, select.ptc_bath_heater.cold_mode, select.ptc_bath_heater.vent_mode, button.ptc_bath_heater.stop_working
customizes: 
sensor_properties: temperature
switch_properties: heating,blow,ventilation
select_properties: heat_mode,cold_mode,vent_mode
number_properties: target_temperature,off_delay_time
button_actions: stop_working
chunk_coordinators:
  - interval: 10
    props: on,mode,target_temperature,fan_level

device_class: update
friendly_name: 浴霸 信息

Home Assistant Logs / 系统日志

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 379, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 280, in _async_update_data
return await self.update_method()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/xiaomi_miot/core/device.py", line 513, in _update
result = await self.update_miot_status(mapping)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/xiaomi_miot/core/device.py", line 848, in update_miot_status
res = await self.local.async_get_properties_for_mapping(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<3 lines>...
)
^
File "/config/custom_components/xiaomi_miot/core/device.py", line 1346, in async_get_properties_for_mapping
return await self.hass.async_add_executor_job(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<6 lines>...
)
^
File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/xiaomi_miot/core/device.py", line 1339, in get_properties_for_mapping
return self.get_properties(
~~~~~~~~~~~~~~~~~~~^
properties,
^^^^^^^^^^^
property_getter='get_properties',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
max_properties=max_properties,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/local/lib/python3.13/site-packages/miio/device.py", line 240, in get_properties
values.extend(self.send(property_getter, _props[:max_properties]))
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/miio/device.py", line 107, in send
return self._protocol.send(
~~~~~~~~~~~~~~~~~~~^
command, parameters, retry_count, extra_parameters=extra_parameters
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/local/lib/python3.13/site-packages/miio/miioprotocol.py", line 202, in send
self.__id = payload["id"]
~~~~~~~^^^^^^
TypeError: byte indices must be integers or slices, not str

@sephrioth
Copy link

同样问题, 一直在 unknown 和正常状态之间频繁切换。

@chenvd chenvd changed the title 易来浴霸灯频频在未知在可用状态见切换 易来浴霸灯频频在未知和可用状态间切换 Dec 30, 2024
@al-one
Copy link
Owner

al-one commented Dec 30, 2024

尝试master分支。

wget -O - https://get.hacs.vip | DOMAIN=xiaomi_miot ARCHIVE_TAG=master bash -

@chenvd
Copy link
Author

chenvd commented Dec 30, 2024

尝试master分支。

wget -O - https://get.hacs.vip | DOMAIN=xiaomi_miot ARCHIVE_TAG=master bash -

master的代码解决了这个问题,非常感谢。

但是我又发现了另一个问题,应该和这个问题无关,但是也是浴霸的问题,同一个设备,切换预设“换气”的时候会报一个错,但是实际上是切换成功的。

image

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

3 participants