tomasmcguinness / homeassistant-mixergy

Add support for Mixergy's smart water tank into Home Assistant
MIT License
31 stars 8 forks source link

AttributeError: 'DataUpdateCoordinator' object has no attribute 'tank_id' #1

Closed dandwhelan closed 1 year ago

dandwhelan commented 1 year ago

I've tried adding and removing this integration multiple times, but I get this error each time.

Could you please fix this or assist me on how I can resolve this myself?

Logger: homeassistant.components.sensor Source: custom_components/mixergy/sensor.py:297 Integration: Sensor (documentation, issues) First occurred: 7 August 2022 at 22:22:23 (5 occurrences) Last logged: 11:50:08

Error while setting up mixergy platform for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform await asyncio.shield(task) File "/config/custom_components/mixergy/sensor.py", line 41, in async_setup_entry new_entities.append(EnergySensor(coordinator)) File "/config/custom_components/mixergy/sensor.py", line 297, in init uniqueid=f"mixergy{tank.tank_id}_energy" AttributeError: 'DataUpdateCoordinator' object has no attribute 'tank_id'

tomasmcguinness commented 1 year ago

Hi,

I haven't seen this before. Are you installing manually or using HACS?

dandwhelan commented 1 year ago

Hi,

I haven't seen this before. Are you installing manually or using HACS?

Hi Tom, I've used the HACS using a custom repo. Shall I try the manual way?

tomasmcguinness commented 1 year ago

It's the same code, I just wanted to make sure you were using the most up-to-date version.

I've had a look and found what I think is the issue! I've pushed a small commit. I've created a new release v0.0.5, which should fix the issue.

dandwhelan commented 1 year ago

Fantastic. thanks for looking at it so quickly! Looking forward to trying it out.

On Mon, 8 Aug 2022, 12:48 Tomas McGuinness, @.***> wrote:

It's the same code, I just wanted to make sure you were using the most up-to-date version.

I've had a look and found what I think is the issue! I've pushed a small commit. I've created a new release v0.0.5, which should fix the issue.

— Reply to this email directly, view it on GitHub https://github.com/tomasmcguinness/homeassistant-mixergy/issues/1#issuecomment-1208023683, or unsubscribe https://github.com/notifications/unsubscribe-auth/AS34JH3GZ3YFZL6A5DIRIPLVYDXXTANCNFSM554VS54Q . You are receiving this because you authored the thread.Message ID: @.***>

dandwhelan commented 1 year ago

Works perfectly :)

tomasmcguinness commented 1 year ago

Great!

If you have any suggestions for things you'd like to see, I'd love to hear them.

How are you finding the Mixergy tank overall?

dandwhelan commented 1 year ago

I've recently got Solar and will be using excess Solar to dump some charge into the hot water tank. I'm looking at finding a way to report tank % charged without indirect or direct electricity (as solar doesn't show as many).

Overall I think the Mixergy is great, it's made a dumb home appliance rather smart.

On Mon, 8 Aug 2022 at 19:46, Tomas McGuinness @.***> wrote:

Great!

If you have any suggestions for things you'd like to see, I'd love to hear them.

How are you finding the Mixergy tank overall?

— Reply to this email directly, view it on GitHub https://github.com/tomasmcguinness/homeassistant-mixergy/issues/1#issuecomment-1208479209, or unsubscribe https://github.com/notifications/unsubscribe-auth/AS34JH4PJCQ6O26C3DUVIJ3VYFIWTANCNFSM554VS54Q . You are receiving this because you modified the open/close state.Message ID: @.***>