Add sensors and services to RainMachine#14326
Add sensors and services to RainMachine#14326MartinHjelmare merged 35 commits intohome-assistant:devfrom
Conversation
|
FYI: been running this in my local HASS for a week or so and everything seems to work fine. |
There was a problem hiding this comment.
Please use git mv <X> <Y> to keep history attached to a file
There was a problem hiding this comment.
Not sure what you mean here – I performed git mv homeassistant/components/rainmachine.py homeassistant/components/rainmachine/__init__.py, but the result appears to be the same as before.
There was a problem hiding this comment.
These are all device configurations, not representations of conditions. Example: TYPE_FREEZE means "Is the device currently restricted from watering because it's too cold outside?" That doesn't seem to fit the spirit of the cold device class. The same is true for the other sensors.
That said, let me know if you'd rather they be coerced into that format and I'll get it done.
There was a problem hiding this comment.
Don't catch this, instead a voluptuous schema should make sure we never get bad keys.
There was a problem hiding this comment.
This seems like the RainMachineEntity is overcomplicated. The logic is hard to follow.
There was a problem hiding this comment.
You need to annotate this as callback or else it will run synchronous
There was a problem hiding this comment.
Why are the keys called ATTR? Shouldn't it be TYPE or something ?
There was a problem hiding this comment.
What are these errors? Why isn't Rainmachine raising their own error type?
There was a problem hiding this comment.
Please remove some of the debugs.
Description:
Adds several (binary) sensors to the RainMachine component:
Additionally, this PR adds several services:
start_programstart_zonestop_allstop_programstop_zoneRelated issue (if applicable): N/A
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#5322
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:
- [ ] New dependencies have been added to theREQUIREMENTSvariable (example).- [ ] New dependencies are only imported inside functions that use them (example).- [ ] New dependencies have been added torequirements_all.txtby runningscript/gen_requirements_all.py.- [ ] New files were added to.coveragerc.