-
Notifications
You must be signed in to change notification settings - Fork 653
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
Add support for green LEDs to API #4556
Conversation
I guess @agners changed a bit how LED would work in future. The LED are now get restored from Supervisor on first start and the dbus command directly control the state. Like I understand it, the Yellow will get the same changes for LED. All other options still would need a reboot |
@pvizeli can you clarify what you mean by "restored from Supervisor on first start"? Supervisor isn't running when OS starts up so how can this be? I can change supervisor so its stores the expected values for the LEDs in its file config and posts that value on startup. But that seems very strange to me. What will the LEDs do between the time of system startup and supervisor startup, just revert to default behavior? I do like that they change immediately without a reboot though, that's nice. |
3e3c8bd
to
fb6d5a4
Compare
@pvizeli ok I changed it. Supervisor now stores changes to LEDs on disk like the others. It then posts the expected value for LEDs on startup when we connect to the dbus interface for the board. Although all boards have a different config only one can be in use at the same time so I had them all share I updated yellow with this PR as well in anticipation of the change you said. I kept the |
Yes, they have the default behavior during that time. It is a bit a trade-off of simplicity on implementation side vs. how early we can disable them. For Yellow disabling them early was quite easy since overlay parameters have been available. It would be a bit more complex for Green. But in any case, it requires to store the requested state in some boot time configuration, which essentially made the reboot necessary. So now reconsidering the implementation with Green, I've chosen to have them be on a bit longer, but make the implementation simpler. As an added benefit with that implementation it will apply the state immediately. The lights are now on longer, but at very early boot, they did would light up also in the other implementation variant 🤷♂️ |
Proposed change
Add APIs for changing Green LEDs per its DBus interface (home-assistant/os-agent#164)
Type of change
Additional information
Checklist
black --fast supervisor tests
)If API endpoints of add-on configuration are added/changed: