From d77062cdf9960d253cab6ed275b6aa0a8b3c0c93 Mon Sep 17 00:00:00 2001 From: Jack Simbach Date: Sun, 12 Dec 2021 11:10:11 -0500 Subject: [PATCH] - fixes for flow rate and icons --- custom_components/ge_home/devices/water_filter.py | 3 ++- custom_components/ge_home/devices/water_softener.py | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/custom_components/ge_home/devices/water_filter.py b/custom_components/ge_home/devices/water_filter.py index b926291..d938df1 100644 --- a/custom_components/ge_home/devices/water_filter.py +++ b/custom_components/ge_home/devices/water_filter.py @@ -7,6 +7,7 @@ from gehomesdk import ErdCode, ErdApplianceType from .base import ApplianceApi from ..entities import ( GeErdSensor, + GeErdPropertySensor, GeErdBinarySensor, GeErdFilterPositionSelect, ) @@ -28,7 +29,7 @@ class WaterFilterApi(ApplianceApi): GeErdFilterPositionSelect(self, ErdCode.WH_FILTER_POSITION), GeErdBinarySensor(self, ErdCode.WH_FILTER_MANUAL_MODE, icon_on_override="mdi:human", icon_off_override="mdi:robot"), GeErdBinarySensor(self, ErdCode.WH_FILTER_LEAK_VALIDITY, device_class_override="moisture"), - GeErdSensor(self, ErdCode.WH_FILTER_FLOW_RATE), + GeErdPropertySensor(self, ErdCode.WH_FILTER_FLOW_RATE, "flow_rate"), GeErdSensor(self, ErdCode.WH_FILTER_DAY_USAGE), GeErdSensor(self, ErdCode.WH_FILTER_LIFE_REMAINING), GeErdBinarySensor(self, ErdCode.WH_FILTER_FLOW_ALERT, device_class_override="moisture"), diff --git a/custom_components/ge_home/devices/water_softener.py b/custom_components/ge_home/devices/water_softener.py index fed8841..5e5feed 100644 --- a/custom_components/ge_home/devices/water_softener.py +++ b/custom_components/ge_home/devices/water_softener.py @@ -7,6 +7,7 @@ from gehomesdk import ErdCode, ErdApplianceType from .base import ApplianceApi from ..entities import ( GeErdSensor, + GeErdPropertySensor, GeErdBinarySensor, GeErdShutoffPositionSelect, ) @@ -24,13 +25,13 @@ class WaterSoftenerApi(ApplianceApi): ws_entities = [ GeErdBinarySensor(self, ErdCode.WH_FILTER_MANUAL_MODE, icon_on_override="mdi:human", icon_off_override="mdi:robot"), - GeErdSensor(self, ErdCode.WH_FILTER_FLOW_RATE), + GeErdPropertySensor(self, ErdCode.WH_FILTER_FLOW_RATE, "flow_rate"), GeErdBinarySensor(self, ErdCode.WH_FILTER_FLOW_ALERT, device_class_override="moisture"), GeErdSensor(self, ErdCode.WH_FILTER_DAY_USAGE), GeErdSensor(self, ErdCode.WH_SOFTENER_ERROR_CODE, icon_override="mdi:alert-circle"), GeErdSensor(self, ErdCode.WH_SOFTENER_LOW_SALT, icon_override="mdi:grain"), GeErdSensor(self, ErdCode.WH_SOFTENER_SHUTOFF_VALVE_STATE, icon_override="mdi:state-machine"), - GeErdSensor(self, ErdCode.WH_SOFTENER_SALT_LIFE_REMAINING, icon_override="mdi:wrench-clock"), + GeErdSensor(self, ErdCode.WH_SOFTENER_SALT_LIFE_REMAINING, icon_override="mdi:calendar-clock"), GeErdShutoffPositionSelect(self, ErdCode.WH_SOFTENER_SHUTOFF_VALVE_CONTROL), ] entities = base_entities + ws_entities