Powertag-E no attribute "get" (new on 3.4.4)
senna1992 opened this issue · 9 comments
Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht
Logger: homeassistant
Source: custom_components/wiser/sensor.py:1196
Integration: Drayton Wiser Integration for Home Assistant (documentation, issues)
First occurred: 06:36:02 (13 occurrences)
Last logged: 06:42:06
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 256, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 412, in _async_refresh
self.async_update_listeners()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 183, in async_update_listeners
update_callback()
File "/config/custom_components/wiser/sensor.py", line 1196, in _handle_coordinator_update
self._state = self._data.wiserhub.devices.get_by_id(self._device_id).get(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: '_WiserPowerTagEnergy' object has no attribute 'get'
I have also this issue on the heating actuator too
2024-03-05 08:29:19.423 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 256, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 412, in _async_refresh
self.async_update_listeners()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 183, in async_update_listeners
update_callback()
File "/config/custom_components/wiser/sensor.py", line 1196, in _handle_coordinator_update
self._state = self._data.wiserhub.devices.get_by_id(self._device_id).get(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: '_WiserPowerTagEnergy' object has no attribute 'get'
2024-03-05 08:29:22.695 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 256, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 412, in _async_refresh
self.async_update_listeners()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 183, in async_update_listeners
update_callback()
File "/config/custom_components/wiser/sensor.py", line 1196, in _handle_coordinator_update
self._state = self._data.wiserhub.devices.get_by_id(self._device_id).get(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: '_WiserHeatingActuator' object has no attribute 'get'
the consequence is that the lts_power and lts_energy are unknown
To workaround , I've modified the sensor.py line 1196 by
if self._lts_sensor_type == "Power":
self._state = self._data.wiserhub.devices.get_by_id(self._device_id).instantaneous_power
elif self._lts_sensor_type == "Energy":
self._state = round(
self._data.wiserhub.devices.get_by_id(self._device_id).delivered_power
/ 1000,
2,
)
Oh, sorry about that. Will fix today.
v3.4.5 released that should resolve this.
great!
👍
@senna1992 - just checking that yours is now working ok?
Good, glad working again.
(fyi: my wiser room thermostat is appearing already. Currently I can see it's battery but not the sensors (temp and hum) nor the set temp). If you plan to integrate it anytime in the future - notify me and I'll post debug logs and test your code if wanted :)
The roomstats have been supported for some time. You shoud see device lock & identify switches and battery and signal sensors. Temp & humidity will show in the room the roomstat is allocated too, along with the set temp.
Closing as resolved in v3.4.5