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 OSO Energy binary sensors #117174
base: dev
Are you sure you want to change the base?
Add OSO Energy binary sensors #117174
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @osohotwateriot for contributing!
The PR looks good so far! The description listed that tests had been added, but I didn't see any. If not adding any, please can you update the PR description? Adding tests really helps if you can do that.
I would also recommend adding an icons.json to give a default icon to the new sensors.
@@ -988,6 +988,7 @@ omit = | |||
homeassistant/components/oru/* | |||
homeassistant/components/orvibo/switch.py | |||
homeassistant/components/osoenergy/__init__.py | |||
homeassistant/components/osoenergy/binary_sensor.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to add tests for these new sensors?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added the default icons in the icons.json file and updated the PR description for the unit tests.
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple more comments - sorry for the extra questions - I don't have any way to see what's in the data. If you have some example returned data dicts or a test API that would help.
The main question is around whether device_id includes a unique identifier.
Thanks for adding the icons!
Breaking change
Proposed change
Add binary sensors to OSO Energy
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: