From 315b21ad1db6ad18afc5d96e5093d75c8fd5b85b Mon Sep 17 00:00:00 2001 From: Chris Jowett <421501+cryptk@users.noreply.github.com> Date: Wed, 15 Jan 2025 14:33:51 -0600 Subject: [PATCH] feat: support more chlorinators --- custom_components/omnilogic_local/const.py | 2 -- custom_components/omnilogic_local/manifest.json | 4 ++-- custom_components/omnilogic_local/number.py | 3 +++ custom_components/omnilogic_local/sensor.py | 5 ++++- pyproject.toml | 2 +- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/custom_components/omnilogic_local/const.py b/custom_components/omnilogic_local/const.py index db3578a..1d87532 100644 --- a/custom_components/omnilogic_local/const.py +++ b/custom_components/omnilogic_local/const.py @@ -4,8 +4,6 @@ from pyomnilogic_local.omnitypes import OmniType -# from homeassistant.backports.enum import StrEnum - DOMAIN: Final[str] = "omnilogic_local" KEY_COORDINATOR: Final[str] = "coordinator" DEFAULT_SCAN_INTERVAL: Final[int] = 10 diff --git a/custom_components/omnilogic_local/manifest.json b/custom_components/omnilogic_local/manifest.json index 22d67b0..9458f25 100644 --- a/custom_components/omnilogic_local/manifest.json +++ b/custom_components/omnilogic_local/manifest.json @@ -13,9 +13,9 @@ "issue_tracker": "https://github.com/cryptk/haomnilogic-local/issues", "loggers": ["pyomnilogic_local"], "requirements": [ - "python_omnilogic_local==0.18.0" + "python_omnilogic_local==0.19.0" ], "ssdp": [], - "version": "0.7.11", + "version": "0.7.12", "zeroconf": [] } diff --git a/custom_components/omnilogic_local/number.py b/custom_components/omnilogic_local/number.py index e366d52..2514f61 100644 --- a/custom_components/omnilogic_local/number.py +++ b/custom_components/omnilogic_local/number.py @@ -92,6 +92,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry, async_add_e "Chlorinator ORP control is not supported yet, " "please raise an issue: https://github.com/cryptk/haomnilogic-local/issues" ) + case ChlorinatorDispenserType.LIQUID: + # Working in issue #116 on this support + pass case _: _LOGGER.warning( "Your system has an unsupported chlorinator, please raise an issue: https://github.com/cryptk/haomnilogic-local/issues" diff --git a/custom_components/omnilogic_local/sensor.py b/custom_components/omnilogic_local/sensor.py index 14ea75b..47080ba 100644 --- a/custom_components/omnilogic_local/sensor.py +++ b/custom_components/omnilogic_local/sensor.py @@ -88,7 +88,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry, async_add_e # As far as I can tell, "external input" sensors are not exposed in the telemetry, # they are only used for things like equipment interlocks pass - case CSADType.ACID: + case CSADType.ACID | CSADType.CO2: _LOGGER.debug( "Configuring sensor for CSAD ACID with ID: %s, Name: %s", sensor.msp_config.system_id, @@ -131,6 +131,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry, async_add_e entities.append( OmniLogicChlorinatorSaltLevelSensorEntity(coordinator=coordinator, context=system_id, sensor_type="instant") ) + case ChlorinatorDispenserType.LIQUID: + # It looks like there are no liquid sensors exposed in the telemetry + pass case _: _LOGGER.warning( "Your system has an unsupported chlorinator, please raise an issue: https://github.com/cryptk/haomnilogic-local/issues" diff --git a/pyproject.toml b/pyproject.toml index e8fa1ac..403990e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "haomnilogic-local" -version = "0.7.11" +version = "0.7.12" description = "A Home Assistant integration for Hayward OmniLogic/OmniHub pool controllers using the local UDP api" readme = "README.md" authors = [