home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.33k stars 30.27k forks source link

Issues with Rheem Electric Energy Usage #85093

Closed LostInIgnorance closed 1 year ago

LostInIgnorance commented 1 year ago

The problem

Recently I am unable to get the total energy usage (as of Jan 1st at 730P CST) I am not receiving any new values and have an error on the device integration now.

What version of Home Assistant Core has the issue?

2023.1.0b5

What was the last working version of Home Assistant Core?

2023.1.0b2

What type of installation are you running?

Home Assistant Core

Integration causing the issue

Rheem EcoNet Products

Link to integration documentation on our website

https://rc.home-assistant.io/integrations/econet

Diagnostics information

The entity [sensor.electric_water_heater_power_usage_today] no longer is pulling in values, yet Rheem app shows correct usage.

This entity is no longer being provided by the econet integration. If the entity is no longer in use, delete it in settings.

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2023-01-03 19:43:05.560 ERROR (MainThread) [homeassistant.util.logging] Exception in on_update_received when dispatching 'econet.push_update': ()
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/econet/__init__.py", line 130, in on_update_received
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 556, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 597, in _async_write_ha_state
    state = self._stringify_state(available)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 562, in _stringify_state
    if (state := self.state) is None:
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 855, in state
    value = self.native_value
  File "/usr/src/homeassistant/homeassistant/components/econet/sensor.py", line 87, in native_value
    value = getattr(self._econet, SENSOR_NAMES_TO_ATTRIBUTES[self._device_name])
AttributeError: 'WaterHeater' object has no attribute 'todays_energy_usage'

Additional information

No response

home-assistant[bot] commented 1 year ago

Hey there @vangorra, @w1ll1am23, mind taking a look at this issue as it has been labeled with an integration (econet) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `econet` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Change the title of the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign econet` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


econet documentation econet source (message by IssueLinks)

w1ll1am23 commented 1 year ago

Sorry about that I forgot there was a change made to the energy usage with the last pyeconet update.

This should fix the issue in the library. @LostInIgnorance do you have the ability to test this locally? The easiest thing to do would be to drop all of the entire econet directory in to the custom_components directory in your config folder and then change the pyeconet version in the manifest.json to 0.1.18

https://github.com/w1ll1am23/pyeconet/pull/28

w1ll1am23 commented 1 year ago

I can't test this today, I might be able to tomorrow, but if @LostInIgnorance can confirm its working then we should be able to merge #85094

LostInIgnorance commented 1 year ago

@w1ll1am23 I am pretty new to this whole editing directly on home assistant. If I had a clue how to do that, I would.

w1ll1am23 commented 1 year ago

@LostInIgnorance no problem, thanks for bringing it up. I just tested and its working for me.