Pyhass / Hive-Custom-Component

A custom version of the home assistant hive component
MIT License
33 stars 17 forks source link

[BUG] Error adding entities for domain water_heater with platform hive #122

Closed sym0nd0 closed 2 years ago

sym0nd0 commented 2 years ago

Describe the bug Following update to HA 2022.7.2, I've started seeing the following in my logs:

Logger: homeassistant.components.water_heater
Source: custom_components/hive/water_heater.py:78
Integration: Water Heater (documentation, issues)
First occurred: 09:05:32 (2 occurrences)
Last logged: 09:05:32

Error adding entities for domain water_heater with platform hive
Error while setting up hive platform for water_heater
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 397, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 457, in _async_add_entity
    if entity.unique_id is not None:
  File "/config/custom_components/hive/water_heater.py", line 78, in unique_id
    return self._unique_id
AttributeError: 'HiveWaterHeater' object has no attribute '_unique_id'

As a result the entity for Hot Water is unavailable.

To Reproduce Steps to reproduce the behaviour:

  1. Update HA to 2022.7.2

Expected behaviour Available Hot Water entity, controllable through HA

Screenshots image

Desktop (please complete the following information):

Additional context Home Assistant 2022.7.2 Supervisor 2022.07.0 Operating System 8.2 Frontend 20220707.0 - latest

Hive Custom Component 2022.7.1

daanvb commented 2 years ago

I'm also seeing this too

holdestmade commented 2 years ago

Me too

virtusas commented 2 years ago

Same here. No Hot Water Entity available.

coedeva commented 2 years ago

Same here - I tried reinstalling the last version - no joy. I had to restore from a full backup to get it working again so I’m now still on previous version F5569C39-7ED3-4770-9CAC-2B6C5D21AB5D 7BBB4B63-5E2E-484F-808C-096879451C63

KJonline commented 2 years ago

Please can this be retested 2022.7.2 has been released to address this

virtusas commented 2 years ago

I am on core 2022.7.3 and still same. Added in as new from scratch and same result.

holdestmade commented 2 years ago

Worked for me, water heater is now working fine

HA2022.7.3, CC2022.7.2

Untitled

virtusas commented 2 years ago

Did you remove

Worked for me, water heater in now working fine

HA2022.7.3

What steps did you take to fix it, or you just left it to update to 2022.7.3? As I removed it on 2022.7.2, added in again and no help. Now Im on 2022.7.3 and same. I wonder should I remove repository from HACS and add as brand new? Thank you.

holdestmade commented 2 years ago

I just clicked on update in HACS and restarted

sym0nd0 commented 2 years ago

Please can this be retested 2022.7.2 has been released to address this

No change for me on 2022.7.3. If you need any more logs or data give me a shout.

Edit, I'm a tired idiot and have just realised you probably meant the integration 2022.7.2. 🤦🏼‍♂️ Sorry.

No update available through HACS yet. Will update and report back as soon as it's available.

Edit 2, yup it's back. 🕺 Thanks.

Screenshot_20220713-175332_Home Assistant.jpg

Had to rename the entity after the update and the state no longer shows on Lovelace dashboard but does elsewhere. 😕

Screenshot_20220713-175400_Home Assistant.jpg

KJonline commented 2 years ago

@virtusas have you upgraded trough hacs to hive custom component version 2022.7.2

virtusas commented 2 years ago

@virtusas have you upgraded trough hacs to hive custom component version 2022.7.2

Yep. Just now updated, restarted and same :(

virtusas commented 2 years ago

@virtusas have you upgraded trough hacs to hive custom component version 2022.7.2

Back in action. Deleted again, redownloaded repository installed as normal. And came back now. Thank you kindly.

KJonline commented 2 years ago

Closing this as the issue seems to be fixed