ekutner / home-connect-hass

Alternative (and improved) Home Connect integration for Home Assistant
MIT License
494 stars 53 forks source link

What's 'unavailable' versus 'Not available' ? #284

Closed oywino closed 7 months ago

oywino commented 8 months ago

-->

Describe the bug

Sometimes when this fine integration is updated to a new version, I end up with some new entities while loosing others. Maybe that's normal? But in the picture below which is part of the entity list for a Siemens inductive cooker, some entities are listed as 'unavailable' while others (the yellow ones) are listed as 'Not available' To me that holds the same meaning, but obviously there are something significant differences. I guess my bottom line question is: Which type is safe to delete? Both or none?

image

Version of the custom_component

0.7.0 ## Configuration home_connect_alt: client_id: 301C08ED8D8A494B5FCEC88B0B74XXXXXXXXXXXXXXXXXX5E820E457F485ADA4 client_secret: 0B39561B9F8DDYYYYYYYYYYYYYYYYYYYYYY99CB62F290459E3A685C6323 name_template: $brand $appliance - $name ## Debug log ](https://pastebin.com/Y4k8e9UX) ```text Paste the exception info here ```
ekutner commented 8 months ago

Well, I've never seen those yellow warnings, where exactly do you get them? Can you click on them to get more information? It will also be useful to go to the States page under Developer Tools find them there and see if there is any interesting information about them. That said note the following:

  1. The integration creates entities dynamically when they are provided by the API. There are a lot of entities that are only provided when the appliance is at specific states (e.g. a program is running, a delayed start program was set, etc.). These entities are not remembered between restarts of HA, so every time it is restarted those entities will have to be "re-learned", which means the appliance will have to get to that state again before they are created. Until that happens if you open the entity's "more info" dialog you'll see a warning saying something like "this entity is no longer being provided by the integration": image

  2. Even after an entity is created it may become unavailable for the above reason, for example, a "Remaining program time" sensor is only available while a program is running. On the other hand the Start Program button is only available when a program is not running and the appliance allows remote start.

  3. In general it is always okay to delete entities, as long as you don't care about their history, because if they are encountered again they will just be recreated with the same entity ID as before.

  4. Finally, those entities with the yellow warning look suspicious, in the sense that their IDs suggest they should be values of another sensor entity and not entities on their own right, so I'm not sure how they were created. Maybe at some point they were mistakenly provided by the API as options instead of option values, but that's just speculation.

I'm not sure there is anything I would learn from the log in this case but in any case, I wasn't able to access it because it is private on pastebin. Don't use pastebin for that, just drag the file here and it will be attached to your message.

oywino commented 8 months ago

Hi and many thanks for yur quick and extensive reply. Especially your bullet#3 was very enlightening to me. I've alwys been afraid of deleting anything. I may have unintentionally mislead you regarding those yellow warnings. They actually showed up inside a front end Entities Card. Which probably explains their odd nature. These are not clickable. Sorry. Probably leftovers from long ago when they were provided by the integration but has since been removed.

ekutner commented 8 months ago

As I suggested you can try searching for them in the developer tools, but other than that I don't have any more insight on them.