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

Keep old values instead of setting all to unavailable #507

Closed
green-dragon-pixel opened this issue Jan 1, 2025 · 3 comments
Closed

Keep old values instead of setting all to unavailable #507

green-dragon-pixel opened this issue Jan 1, 2025 · 3 comments
Labels
wontfix This will not be worked on

Comments

@green-dragon-pixel
Copy link
Contributor

First I want to say thanks a lot for the hard work!

I'm trying to use a vehicle card with the data delivered by your extension. Unfortunatelly the car goes into sleep mode to protect it's battery. I'm always frustrated when all the values turn from a valid informatio to "Unavailable" as the last usefull information is overwritten.

Describe the solution you'd like

  1. For the UI it would be great if the values are updated as we get new valid information and skip the Unavailable.
  2. A new sensor could be added showing that the connection status "Unavailable" or "Connected"
  3. In cases that the data is Unavailable, a button can be offered to wake the car up and force update the values.

Describe alternatives you've considered
The only other solution that went through my mind was to setup for every sensor a helper that ignores the Unavailable states. This is a lot of work.

Additional context
I have a Skoda Octavia from 2018.
Since I had to change the pull time to 180 minutes to keep the integration from being blocked, I have unfortunately, for the next 3 hours no valid data. This happens too often as the myskoda app awakes the car only 2-3 times a day.

Please let me know how you see this and maybe have another ideas how to elegantly solve this issue. I'm currently experimenting with two vehicle cards: Ultra Vehicle Card (https://ultravehiclecard.com) and Vehicle Status Card (https://github.com/ngocjohn/vehicle-status-card).

All the best! Bogdan

@WebSpider
Copy link
Contributor

This is an interesting case. As far as we know, the car only goes into battery protection after you have issued commands that alter the configuration of the car. Are you doing this on a regular basis?

Do you have logs available showing what the API is responding when battery protection kicks in, so we can recognise this is the case?

@dvx76
Copy link
Member

dvx76 commented Jan 4, 2025

Generally speaking, for HA integrations, the expected behavior is that entities will become Unavailable when there is a failure to retrieve the relevant data. That is the correct state. The actual value may still be the last value, but it is unknown.

This is a recurring topic in many HA forums, e.g. https://community.home-assistant.io/t/sensor-display-last-known-value-instead-of-unavailable/200081

If there are entities for which you really want to display the last known state the typically recommended approach is to create a corresponding template entity which mirrors the source entity but only updates if the state is available.

@WebSpider WebSpider added the wontfix This will not be worked on label Jan 7, 2025
@WebSpider
Copy link
Contributor

Since this is expected behaviour, we will not be changing integration to suit this. If you have any more data relating to the behaviour of your Octiavia, please open a seperate issue so we can troubleshoot that.

@WebSpider WebSpider closed this as not planned Won't fix, can't repro, duplicate, stale Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants