Add Omnilogic Switch platform (#42116)

* Bump omnilogic dependency to 0.4.4 to fix Lights key error.

* Bumped dependency to 0.4.5.

* Fixed pump type issue for unique pool structure.

* Create full platform bundle for final testing and PR to Home Assistant dev.

* Removed logger instances not required.

* Fixed lint issues.

* Fixed pylint issues.

* Fix pylint issues. Fix issue with pH sensor offset.

* Stripped light, water_heater platform for PR submit.

* Correct pH and ORP sensor report to unknown with offset if pump is off.

* Moving guard condition check to helper function.

* Update to asyncio.sleep to wait for switch status delay in Hayward API status.

* Removed sleep, added state delay to handle slow Hayward API state update response.

* Fix flake8 issue.

* Fix flake8 issue.

* Fix isort issue.

* Addressed PR Comments.

* Addressed PR comments. Corrected Unit of Measure for sensor where pump speed is not variable.

* Fix pylint issue.

* Address pylint issue.

* Update homeassistant/components/omnilogic/switch.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>
This commit is contained in:
djtimca 2021-04-29 10:46:04 -04:00 committed by GitHub
parent 7c28262bee
commit f7cf82be6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 337 additions and 29 deletions

View file

@ -2,6 +2,8 @@
DOMAIN = "omnilogic"
CONF_SCAN_INTERVAL = "polling_interval"
DEFAULT_SCAN_INTERVAL = 6
DEFAULT_PH_OFFSET = 0
COORDINATOR = "coordinator"
OMNI_API = "omni_api"
ATTR_IDENTIFIERS = "identifiers"
@ -20,7 +22,7 @@ PUMP_TYPES = {
ALL_ITEM_KINDS = {
"BOWS",
"Filter",
"Heater",
"Heaters",
"Chlorinator",
"CSAD",
"Lights",