Skip to content

feat: add restart function#9

Merged
mbillow merged 3 commits intombillow:mainfrom
SamKirsch10:main
Apr 22, 2025
Merged

feat: add restart function#9
mbillow merged 3 commits intombillow:mainfrom
SamKirsch10:main

Conversation

@SamKirsch10
Copy link
Copy Markdown
Contributor

@SamKirsch10 SamKirsch10 commented Apr 22, 2025

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!

Copy link
Copy Markdown
Owner

@mbillow mbillow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution, this definitely seems useful! Can you add some quick tests for this? Happy to merge and release after that. 😄

@SamKirsch10
Copy link
Copy Markdown
Contributor Author

Hmm. Fair point. Will think on how to test this other than "did I get a 200 back".

@mbillow
Copy link
Copy Markdown
Owner

mbillow commented Apr 22, 2025

Hmm. Fair point. Will think on how to test this other than "did I get a 200 back".

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.

Comment thread tests/test_client.py Outdated
Comment thread tests/test_client.py Outdated
Comment thread tests/test_client.py Outdated
@mbillow mbillow merged commit 437c841 into mbillow:main Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants