SAIC-iSmart-API/saic-home-assistant-addon

Unavailable Values now

coolrunning5360 opened this issue · 13 comments

It’s not good if the car currently has no reception and all values are displayed as unavailable. Additionally, the last known values should be shown.

While I see your point, the last values are still retained by HA and the decision has been made to reflect the true state of the car in HA. We don't know the value of the sensors since we don't know what happened since the last error.

We can expose a config option (disabled by default) not put sensors "unavaibile" if the car is offline and we tried to reach it, although please keep in mind that you won't know if a command got executed correctly or the values you are now seeing are true or not.

This causes automations and helpers (like utility meters) to subtly break, behave strangely or provide wrong values.

Also: sensors go "unavailable" only if we tried actively contacting the car and we couldn't.

I understand the decision to do it the way it is now.
However, my issue is that I have no reception at home, and everything always shows as ‘unavailable’ there.
I think it would be better if, as soon as no query is possible, the last available data, for example, are displayed in red. Then you can see at a glance that it’s not the live data.

We have no way of controlling that unfortunately (as far as I know). I'm going to add a HA_SHOW_UNAVAILABLE config settings, default to True.

You can switch that to False then rely on the "Last refresh" values to decide the color to use in the UI. I'll let you know as soon as there's a version you can test, in the meantime you can switch to the pre-release channel of the addon

Oh, thank you very much.
That would be great.

The new version doesn't work, the gateway crashes while initial startup. But home assistant doesn't save addon logs...

@Tonno87 RC2 is out, seems to be working OK here

@coolrunning5360
If you go to the “Add-on” page, on the top right there's a button to force refresh the list of updates, it should pick up the update to 0.6.1-rc2

I have Test it.
This Version with the Setting works now for me.

Nice, you can keep the config as is. Eventually it will be released to the stable branch as well