Closed tomer-w closed 1 day ago
@jdeneef kind reminder. Thanks.
will take a look, hardly any time during weekdays, sry
Hi @jdeneef , thanks for taking a look. What did you do with this PR? It seems deleted.
sry, messed up using github, but now I see I only closed it ;-) more used to local git. Anyways, your request is merged in 1.4.1, see prereleases. I updated your code to avoid flickers at startup, and had to remove some reading of gpio switches before setting from persistence, cause this is more consistent. It's working for me in prod now, please test the prerelease.
I tested it in my setup and it looks great as well. I would remove all the commented lines to clean it up :). I think the changes you made make it looks better. I mainly wanted to minimize changes but you took it further.
nice! I will cleanup in a next drop and make it a github release if no errors pop up. Will test for a few days and than move to release state.
Add new GPIO switch class - PersistentRPiGPIOSwitch which will restore the switch state after Home Assistant restart. As part of the change move the core switch to use async functions
This is based on my work in the original branch: https://github.com/thecode/ha-rpi_gpio/pull/266