diff --git a/custom_components/venta/devices/106.py b/custom_components/venta/devices/106.py index 8eecf51..c495cb9 100644 --- a/custom_components/venta/devices/106.py +++ b/custom_components/venta/devices/106.py @@ -31,9 +31,6 @@ ATTR_TIME_TO_SERVICE, ATTR_WARNINGS, ATTR_WATER_LEVEL, - CLEAN_TIME_DAYS, - FIVE_MINUTES_RESOLUTION, - ION_DISC_REPLACE_TIME_DAYS, LED_STRIP_MODES_EXTERNAL, LED_STRIP_MODES_EXTERNAL_NO_WATER, LED_STRIP_MODES_INTERNAL, @@ -61,6 +58,9 @@ FILTER_WARNING = 8 SERVICE_WARNING = 16 +ION_DISC_REPLACE_TIME_DAYS = 122 +CLEAN_TIME_DAYS = 183 + async def async_setup_humidifier( coordinator: VentaDataUpdateCoordinator, async_add_entities: AddEntitiesCallback @@ -120,7 +120,7 @@ async def async_setup_sensor( value_func=lambda coordinator: venta_time_to_days_left( coordinator.data.info.get("DiscIonT"), ION_DISC_REPLACE_TIME_DAYS, - FIVE_MINUTES_RESOLUTION, + TEN_MINUTES_RESOLUTION, ), ), VentaSensorEntityDescription( @@ -132,7 +132,7 @@ async def async_setup_sensor( value_func=lambda coordinator: venta_time_to_days_left( coordinator.data.info.get("CleaningT"), CLEAN_TIME_DAYS, - FIVE_MINUTES_RESOLUTION, + TEN_MINUTES_RESOLUTION, ), ), VentaSensorEntityDescription( @@ -189,7 +189,7 @@ async def async_setup_sensor( native_unit_of_measurement=UnitOfTime.MINUTES, entity_category=EntityCategory.DIAGNOSTIC, value_func=lambda coordinator: venta_time_to_minutes( - coordinator.data.info.get("OperationT"), FIVE_MINUTES_RESOLUTION + coordinator.data.info.get("OperationT"), TEN_MINUTES_RESOLUTION ), ), VentaSensorEntityDescription( @@ -199,7 +199,7 @@ async def async_setup_sensor( native_unit_of_measurement=UnitOfTime.MINUTES, entity_category=EntityCategory.DIAGNOSTIC, value_func=lambda coordinator: venta_time_to_minutes( - coordinator.data.info.get("DiscIonT"), FIVE_MINUTES_RESOLUTION + coordinator.data.info.get("DiscIonT"), TEN_MINUTES_RESOLUTION ), ), VentaSensorEntityDescription( @@ -209,7 +209,7 @@ async def async_setup_sensor( native_unit_of_measurement=UnitOfTime.MINUTES, entity_category=EntityCategory.DIAGNOSTIC, value_func=lambda coordinator: venta_time_to_minutes( - coordinator.data.info.get("CleaningT"), FIVE_MINUTES_RESOLUTION + coordinator.data.info.get("CleaningT"), TEN_MINUTES_RESOLUTION ), ), VentaSensorEntityDescription( diff --git a/custom_components/venta/devices/107.py b/custom_components/venta/devices/107.py index d7a70cf..846867f 100644 --- a/custom_components/venta/devices/107.py +++ b/custom_components/venta/devices/107.py @@ -31,9 +31,6 @@ ATTR_TIME_TO_SERVICE, ATTR_WARNINGS, ATTR_WATER_LEVEL, - CLEAN_TIME_DAYS, - FIVE_MINUTES_RESOLUTION, - ION_DISC_REPLACE_TIME_DAYS, LED_STRIP_MODES_EXTERNAL, LED_STRIP_MODES_EXTERNAL_NO_WATER, LED_STRIP_MODES_INTERNAL, @@ -61,6 +58,9 @@ FILTER_WARNING = 8 SERVICE_WARNING = 16 +ION_DISC_REPLACE_TIME_DAYS = 122 +CLEAN_TIME_DAYS = 183 + async def async_setup_humidifier( coordinator: VentaDataUpdateCoordinator, async_add_entities: AddEntitiesCallback @@ -120,7 +120,7 @@ async def async_setup_sensor( value_func=lambda coordinator: venta_time_to_days_left( coordinator.data.info.get("DiscIonT"), ION_DISC_REPLACE_TIME_DAYS, - FIVE_MINUTES_RESOLUTION, + TEN_MINUTES_RESOLUTION, ), ), VentaSensorEntityDescription( @@ -132,7 +132,7 @@ async def async_setup_sensor( value_func=lambda coordinator: venta_time_to_days_left( coordinator.data.info.get("CleaningT"), CLEAN_TIME_DAYS, - FIVE_MINUTES_RESOLUTION, + TEN_MINUTES_RESOLUTION, ), ), VentaSensorEntityDescription( @@ -189,7 +189,7 @@ async def async_setup_sensor( native_unit_of_measurement=UnitOfTime.MINUTES, entity_category=EntityCategory.DIAGNOSTIC, value_func=lambda coordinator: venta_time_to_minutes( - coordinator.data.info.get("OperationT"), FIVE_MINUTES_RESOLUTION + coordinator.data.info.get("OperationT"), TEN_MINUTES_RESOLUTION ), ), VentaSensorEntityDescription( @@ -199,7 +199,7 @@ async def async_setup_sensor( native_unit_of_measurement=UnitOfTime.MINUTES, entity_category=EntityCategory.DIAGNOSTIC, value_func=lambda coordinator: venta_time_to_minutes( - coordinator.data.info.get("DiscIonT"), FIVE_MINUTES_RESOLUTION + coordinator.data.info.get("DiscIonT"), TEN_MINUTES_RESOLUTION ), ), VentaSensorEntityDescription( @@ -209,7 +209,7 @@ async def async_setup_sensor( native_unit_of_measurement=UnitOfTime.MINUTES, entity_category=EntityCategory.DIAGNOSTIC, value_func=lambda coordinator: venta_time_to_minutes( - coordinator.data.info.get("CleaningT"), FIVE_MINUTES_RESOLUTION + coordinator.data.info.get("CleaningT"), TEN_MINUTES_RESOLUTION ), ), VentaSensorEntityDescription( diff --git a/resources/parameters/106.json b/resources/parameters/106.json index c429c45..e2ac1db 100644 --- a/resources/parameters/106.json +++ b/resources/parameters/106.json @@ -43,6 +43,7 @@ "name": "OperationT", "type": "long", "description": "Total operating time in 5min resolution e.g. 1 = 5min, 12 = 60min", + "notes": "It seams to by 10mins resolution", "minimum": 0, "maximum": 4294967295, "increment": 1 @@ -51,6 +52,7 @@ "name": "DiscIonT", "type": "integer", "description": "Operation time since last change of Silber-Ionen-Rades in 5min resolution.", + "notes": "It seams to by 10mins resolution and 122 days max", "minimum": 0, "maximum": 65535, "increment": 1 @@ -59,6 +61,7 @@ "name": "CleaningT", "type": "integer", "description": "Operation time since last cleaning in 5min resolution.", + "notes": "It seams to by 10mins resolution and 183 days max", "minimum": 0, "maximum": 65535, "increment": 1 diff --git a/resources/parameters/107.json b/resources/parameters/107.json index 48ebd13..7f3272d 100644 --- a/resources/parameters/107.json +++ b/resources/parameters/107.json @@ -43,6 +43,7 @@ "name": "OperationT", "type": "long", "description": "Total operating time in 5min resolution e.g. 1 = 5min, 12 = 60min", + "notes": "It seams to by 10mins resolution", "minimum": 0, "maximum": 4294967295, "increment": 1 @@ -51,6 +52,7 @@ "name": "DiscIonT", "type": "integer", "description": "Operation time since last change of Silber-Ionen-Rades in 5min resolution.", + "notes": "It seams to by 10mins resolution and 122 days max", "minimum": 0, "maximum": 65535, "increment": 1 @@ -59,6 +61,7 @@ "name": "CleaningT", "type": "integer", "description": "Operation time since last cleaning in 5min resolution.", + "notes": "It seams to by 10mins resolution and 183 days max", "minimum": 0, "maximum": 65535, "increment": 1