-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Restore on deactivate restore wrong state #88
Comments
I was actually thinking it might be better to have a configuration for the 'off' state of the stateful state switch that optionally invokes another scene so that restoring can never be wrong. Maybe there is a bug but some of these scenes can get quite complicated and having an off transition would make things simpler. @hugobloem, if this is something you think would be useful I'd be happy to push a PR time permitting. |
You're right restoring to a previous state is quite complicated and produces some unwanted results with some hardware. The problem is that some lights (or other entities) report their state when they are still transient, causing the integration to think that is the last state of the entity. This is entirely dependent on the hardware and is thus quite hard to solve. Having a pre-defined state that is returned to (rather than the current I am happy to work on this or the other the rounding you mentioned in #106 and I have time to develop it this weekend. Let me know if you would like to develop either issue and we can split up the development. |
Hi Hugo, I don't have tine this weekend but if you need something later, I can help. BTW, this custom integration is awesome and something sorely missing in HA, a huge Hugo thank you to you! |
Hi Hugo, please pick one of the issues and I'll do the other, let me know so we don't duplicate. For this one WRT to returning to a state on off I would think we would have an option to set a scene and pick a scene from a dropdown. There may also be an adjacent task if the integration doesn't refresh its list if a scene is added/removed in order to not require complete reload manually. |
Hi Bill, busy week here sorry. I can work on #106 you could do this one, if you're still interested. |
Sounds good Hugo |
Fixed in 1.60+ |
"restore on deactivate" feature store states after a state change event causing problems with scenes where a entity do more than one state change resulting in integration restoring a "bad" state. (Example, a bulb that informs two state changes for turn on and color change).
A better approach could be grab and store state just before a scene is applied. This may need more tweaks like check what attributes may be changed by the scene and grab those attributes to further restore action.
The text was updated successfully, but these errors were encountered: