-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
Refactor pihole integration #25837
Refactor pihole integration #25837
Conversation
Notes for reviewer: This change lays the groundwork for future functionality i intend to add to the integration shortly after approval. This change itself introduces no new functionality to the integration. |
cbed550
to
3093b16
Compare
4e78b3e
to
c35c52e
Compare
You can use discovery to setup sensor from component without need a config for this |
Quick update: I'm still working on working out the tests portion of this change. My day job has been demanding this past week |
634168f
to
5921c1c
Compare
a6e2300
to
6e85def
Compare
6e85def
to
1730c39
Compare
@fabaff @balloob @MartinHjelmare @pvizeli I believe I have addressed all the concerns raised |
@MartinHjelmare Requested changes have been made and are ready for re-review |
d3c2303
to
cf4c65c
Compare
cf4c65c
to
bf02832
Compare
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.
Looks good!
Can be merged when build passes. |
Please update the config example and breaking change paragraph in the PR description. Please describe briefly what changed and what the user needs to do to cope with the breaking change. |
We don't require a sensor platform config after this PR. We set up the sensor platform via discovery from the pi_hole component module. I've updated the breaking change paragraph and config examples. |
Breaking Change:
This change requires existing configurations for the
pi_hole
integration to be moved from sensor platform key to api_hole
top level key.monitored_conditions
is removedpi_hole
configuration block defines host, port, location and ssl optionsconfiguration.yaml
before this change:configuration.yaml
after this change:Description:
Refactors the
pi_hole
component from a single sensor to an integration with a sensor platform. This allows services, switches, and possibly other entities to be added to the integration in a future pull request.Pull request with documentation for home-assistant.io: home-assistant/home-assistant.io#10097
Example entry for
configuration.yaml
(if applicable):Checklist:
tox
. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
python3 -m script.hassfest
.requirements_all.txt
by runningpython3 -m script.gen_requirements_all
..coveragerc
.If the code does not interact with devices: