From 79d2c878440e2b737307bfb2d39f10e7241d86ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A5le=20Stor=C3=B8=20Hauknes?= Date: Wed, 7 Sep 2022 07:25:23 +0200 Subject: [PATCH] Mill gen 3 cloud, support precision halves for gen 3 heaters (#77932) * Update pymill to latest version * Use float with PRECISION_HALVES for Mill Gen 3 cloud connected heaters --- homeassistant/components/mill/climate.py | 5 +++-- homeassistant/components/mill/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/mill/climate.py b/homeassistant/components/mill/climate.py index fbe4ad44710..a18f9b3bafb 100644 --- a/homeassistant/components/mill/climate.py +++ b/homeassistant/components/mill/climate.py @@ -92,7 +92,6 @@ class MillHeater(CoordinatorEntity, ClimateEntity): _attr_fan_modes = [FAN_ON, FAN_OFF] _attr_max_temp = MAX_TEMP _attr_min_temp = MIN_TEMP - _attr_target_temperature_step = PRECISION_WHOLE _attr_temperature_unit = TEMP_CELSIUS def __init__(self, coordinator, heater): @@ -120,8 +119,10 @@ class MillHeater(CoordinatorEntity, ClimateEntity): self._attr_supported_features = ( ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.FAN_MODE ) + self._attr_target_temperature_step = PRECISION_WHOLE else: self._attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE + self._attr_target_temperature_step = PRECISION_HALVES self._update_attr(heater) @@ -130,7 +131,7 @@ class MillHeater(CoordinatorEntity, ClimateEntity): if (temperature := kwargs.get(ATTR_TEMPERATURE)) is None: return await self.coordinator.mill_data_connection.set_heater_temp( - self._id, int(temperature) + self._id, float(temperature) ) await self.coordinator.async_request_refresh() diff --git a/homeassistant/components/mill/manifest.json b/homeassistant/components/mill/manifest.json index c2adebae594..9a1026e4dfd 100644 --- a/homeassistant/components/mill/manifest.json +++ b/homeassistant/components/mill/manifest.json @@ -2,7 +2,7 @@ "domain": "mill", "name": "Mill", "documentation": "https://www.home-assistant.io/integrations/mill", - "requirements": ["millheater==0.9.0", "mill-local==0.1.1"], + "requirements": ["millheater==0.10.0", "mill-local==0.1.1"], "codeowners": ["@danielhiversen"], "config_flow": true, "iot_class": "local_polling", diff --git a/requirements_all.txt b/requirements_all.txt index ce54414af84..3556fc845af 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1061,7 +1061,7 @@ micloud==0.5 mill-local==0.1.1 # homeassistant.components.mill -millheater==0.9.0 +millheater==0.10.0 # homeassistant.components.minio minio==5.0.10 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 67949a21a2d..678316b2a6c 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -760,7 +760,7 @@ micloud==0.5 mill-local==0.1.1 # homeassistant.components.mill -millheater==0.9.0 +millheater==0.10.0 # homeassistant.components.minio minio==5.0.10