Home Assistant integration with light example #49
+917
−0
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.
Some hackery to allow a Presto to integrate with Home Assistant.
config.py
configuration with host, token, and entity configuration
hampws.py
class to provide access to Home Assistant
hampws_light.py
demonstration of a button that reads state of a light from Home assistant - shows the state on screen as a button either yellow for on or black for off - will continue to read state and update if the light state changes outside of the Presto - will also allow the user to touch the button to turn the light off and on - huzzah!
hampws_test.py
some test code for some of the methods in the class - could do with some improvement for sure - there are some heavy logging outputs here, but for sure will help the user to learn some of the back and forth