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 support for Elexa Guardian water valve controllers #34627
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.
Nice job.
Some minor nits above.
tests/components/guardian/test_config_flow.py ✓✓✓✓✓✓ 100% ██████████
----------- coverage: platform linux, python 3.8.1-final-0 -----------
Name Stmts Miss Cover Missing
--------------------------------------------------------------------------------
homeassistant/components/guardian/config_flow.py 40 0 100%
homeassistant/components/guardian/const.py 17 0 100%
--------------------------------------------------------------------------------
TOTAL 57 0 100%
Results (1.03s):
6 passed
return unload_ok | ||
|
||
|
||
class Guardian: |
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.
Why are we not using our data update coordinator helper? It looks like this class is reimplementing many things from our coordinator.
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.
@MartinHjelmare It makes use of multiple API calls and chooses which API calls to use based on how many entities have registered interest in them. I didn't want to create multiple data coordinators when I could create one object that handles everything.
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 think it would have been a lot easier to use one coordinator per API call. This is complicated logic that we don't want to duplicate in each integration.
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’m not sure I agree it’s easier. Let’s take the convo offline.
…t#34627) * Add support for Elexa Guardian water valve controllers * Zeroconf + cleanup * Sensors and services * API registration * Service bug fixes * Fix bug in cleanup * Tests and coverage * Fix incorrect service description * Bump aioguardian * Bump aioguardian to 0.2.2 * Bump aioguardian to 0.2.3 * Proper entity inheritance * Give device a proper name * Code review
Proposed change
This PR adds support for Elexa Guardian water valve controllers. Per ADR-0010, it can only be configured via the UI (either manually or via
zeroconf
).Type of change
Example entry for
configuration.yaml
:# Example configuration.yaml
Additional information
Checklist
black --fast 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
.The integration reached or maintains the following Integration Quality Scale: