feat: add restart function#9
Merged
mbillow merged 3 commits intombillow:mainfrom Apr 22, 2025
Merged
Conversation
mbillow
requested changes
Apr 22, 2025
Owner
mbillow
left a comment
There was a problem hiding this comment.
Thanks for the contribution, this definitely seems useful! Can you add some quick tests for this? Happy to merge and release after that. 😄
Contributor
Author
|
Hmm. Fair point. Will think on how to test this other than "did I get a 200 back". |
Owner
There are plenty of examples of hitting simple endpoints like this. It doesn’t have to be overly complex. Honestly, I think all the current tests are just mocking the response and verifying success and failure behavior. It’s been a minute since I’ve looked at them though. |
mbillow
requested changes
Apr 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
There have been times with my home charger that I've gotten back a 'fault' status when charging initiates as per the schedule. Usually a restart of the charger fixes this, but I have to go in the app, find the charger, and hit reboot.
This little addition should eventually allow me to automate around any future 'fault' states.
side note... Thanks so much for this! It's helped lots @mbillow!
Future
I plan on (if this is merged), adding this func as a Button entity to the HA repo as a quick followup!