|
发表于 2022-9-12 17:02:26
|
显示全部楼层
本帖最后由 快刀青衣 于 2022-9-12 17:04 编辑
好像没法更新位置是什么情况,添加的时候能成功,但是之后就一直保持那个位置不会变了,日志里面有报错,homeassistant版本2022.6.0.dev20220501,是版本问题吗:
此错误来自自定义集成。
Logger: homeassistant
Source: custom_components/xiaomi_cloud/device_tracker.py:98
Integration: Xiaomi Cloud (documentation, issues)
First occurred: 16:40:09 (2 occurrences)
Last logged: 16:55:24
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 137, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 270, in _async_refresh
update_callback()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 536, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 574, in _async_write_ha_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 542, in _stringify_state
if (state := self.state) is None:
File "/usr/src/homeassistant/homeassistant/components/device_tracker/config_entry.py", line 247, in state
if self.latitude is not None and self.longitude is not None:
File "/config/custom_components/xiaomi_cloud/device_tracker.py", line 98, in latitude
return self.coordinator.data[self._vin]["device_lat"]
IndexError: list index out of range
|
|