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

Future Request: Restore last status after restarting HA. #63

Closed
LHBL2003 opened this issue Feb 10, 2024 · 4 comments
Closed

Future Request: Restore last status after restarting HA. #63

LHBL2003 opened this issue Feb 10, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@LHBL2003
Copy link
Contributor

After restarting HA, the correct status is not displayed.
Yes, the status could have been changed by a button during the restart. However, the probability is much lower than that everything is supposedly off. It would be good if the status before the restart is restored. It would be good if the status could be restored.

Before restart:
image

After restart
image

@LHBL2003 LHBL2003 changed the title Feature-Anfrage: Restore last status after restarting HA. Future Request: Restore last status after restarting HA. Feb 10, 2024
@grimmpp grimmpp added the enhancement New feature or request label Feb 11, 2024
@grimmpp
Copy link
Owner

grimmpp commented Feb 13, 2024

Hello @LHBL2003,

first of all thanks for reporting so many and good feature ideas!!!

I've managed to implement it for sensors like temperature sensors but unfortunately not for binary sensors/switches like lights. I managed HA to remember the latest state and I can read and set it but I'm not able to trigger HA so that it displays its current state. :-(

Unfortunately I also found no docs about it and just checked the HA code.
That's what I came up with and it seems like self.schedule_update_ha_state() is not working at this point:

self.schedule_update_ha_state()

Here you see values are fitting. I received the latest state and set it to the entity. Looks all perfect:
grafik
But the WebUI gets reset.
grafik

@grimmpp
Copy link
Owner

grimmpp commented Feb 14, 2024

after hours of searching the bug I almost removed the last piece of code I took over from the beginning. IT WORKS NOW! But now I need time to test it properly. The changes have big potential to break a lot of things.

@grimmpp
Copy link
Owner

grimmpp commented Feb 16, 2024

Hello @LHBL2003,

state restore feature is implemented and released in v1.3.7.

Unfortunately, I had to implemented a translation of the generic stored state to the settings of all specific devices. From my understanding HA could have implemented a default translation for every device type. So far I was only able to implement the use cases for the device I own. Actually that should currently cover all supported devices in this integration.

Let me know if this is good for you to be closed.

@LHBL2003
Copy link
Contributor Author

LHBL2003 commented Feb 16, 2024

Hello @grimmpp,

At first I almost had a heart attack because everything was no longer accessible. But for some reason a lot of entity IDs were created with _2. See picture. But I was able to fix that by deleting the ELTAKO HUB and recreating everything ;)

image

But it works really well. After the first start, everything is displayed as Unknown. After the first click, it is defined as OFF. After the second click, the light comes on. It also works great with the blinds.

So it works with FSR14SSR, FSR14-4x, FSB14/12-24V, FSB14

Thank you very much, this enriches the Eltako module soooooooooooooooo much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants