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

Powertag-E no attribute "get" (new on 3.4.4) #449

Closed
senna1992 opened this issue Mar 5, 2024 · 9 comments
Closed

Powertag-E no attribute "get" (new on 3.4.4) #449

senna1992 opened this issue Mar 5, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@senna1992
Copy link

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'

@LGO44
Copy link
Contributor

LGO44 commented Mar 5, 2024

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'

@LGO44
Copy link
Contributor

LGO44 commented Mar 5, 2024

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,
        )

@msp1974
Copy link
Collaborator

msp1974 commented Mar 5, 2024

Oh, sorry about that. Will fix today.

@msp1974
Copy link
Collaborator

msp1974 commented Mar 5, 2024

v3.4.5 released that should resolve this.

@msp1974 msp1974 mentioned this issue Mar 5, 2024
Merged
@msp1974 msp1974 added the bug Something isn't working label Mar 5, 2024
@LGO44
Copy link
Contributor

LGO44 commented Mar 5, 2024

great!
👍

@msp1974
Copy link
Collaborator

msp1974 commented Mar 5, 2024

@senna1992 - just checking that yours is now working ok?

@senna1992
Copy link
Author

senna1992 commented Mar 5, 2024 via email

@msp1974
Copy link
Collaborator

msp1974 commented Mar 5, 2024

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.

ie Roomstat Device
image

Kitchen Room Device
image

@msp1974
Copy link
Collaborator

msp1974 commented Mar 7, 2024

Closing as resolved in v3.4.5

@msp1974 msp1974 closed this as completed Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants