From 338c7461b3c0d8f39c1acd801c5315a5c51bc406 Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 13 Nov 2024 12:48:43 +1000 Subject: [PATCH 1/3] =?UTF-8?q?Zenit=20=D0=BF=D0=B5=D1=80=D0=B5=D1=85?= =?UTF-8?q?=D0=BE=D0=B4=D0=B8=D1=82=20=D0=B2=20=D1=80=D0=B5=D0=B6=D0=B8?= =?UTF-8?q?=D0=BC=20=D0=BE=D0=B1=D0=BE=D0=B3=D1=80=D0=B5=D0=B2=D0=B0=20?= =?UTF-8?q?=D0=BF=D1=80=D0=B8=20=D1=81=D0=BC=D0=B5=D0=BD=D0=B5=20=D1=82?= =?UTF-8?q?=D0=B5=D0=BC=D0=BF=D0=B5=D1=80=D0=B0=D1=82=D1=83=D1=80=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- custom_components/turkov/climate.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/custom_components/turkov/climate.py b/custom_components/turkov/climate.py index d1898da..335028e 100644 --- a/custom_components/turkov/climate.py +++ b/custom_components/turkov/climate.py @@ -269,8 +269,6 @@ async def async_set_temperature(self, **kwargs: Any) -> None: # Device calls if not device.is_on: await device.turn_on() - if not device.is_heater_on: - await device.turn_on_heater() await device.set_target_temperature(kwargs[ATTR_TEMPERATURE]) # Refresh call From c8c2df67571845401f131c457745c8d83cf95927 Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 13 Nov 2024 12:54:27 +1000 Subject: [PATCH 2/3] =?UTF-8?q?=D0=9D=D0=B5=20=D1=83=D1=81=D1=82=D0=B0?= =?UTF-8?q?=D0=BD=D0=B0=D0=B2=D0=BB=D0=B8=D0=B2=D0=B0=D0=B5=D1=82=D1=81?= =?UTF-8?q?=D1=8F=20=D1=82=D0=B5=D0=BC=D0=BF=D0=B5=D1=80=D0=B0=D1=82=D1=83?= =?UTF-8?q?=D1=80=D0=B0=20=D0=B2=20=D0=BD=D0=BE=D0=B2=D0=BE=D0=B9=20=D0=B2?= =?UTF-8?q?=D0=B5=D1=80=D1=81=D0=B8=D0=B8=20=D0=BF=D1=83=D0=BB=D1=8C=D1=82?= =?UTF-8?q?=D0=B0=20=D0=B8=20=D0=BC=D0=BE=D0=BD=D0=BE=D0=BA=D0=BE=D0=BD?= =?UTF-8?q?=D1=82=D1=80=D0=BE=D0=BB=D0=BB=D0=B5=D1=80=D0=B0=20https://gith?= =?UTF-8?q?ub.com/alryaz/hass-turkov/issues/5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- custom_components/turkov/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/turkov/api.py b/custom_components/turkov/api.py index ab3344d..d345745 100644 --- a/custom_components/turkov/api.py +++ b/custom_components/turkov/api.py @@ -761,7 +761,7 @@ async def set_value_local(self, key: str, value: Any) -> None: request_url = self.base_url + "/command" _LOGGER.debug(f"[{self}] Sending `{key}`=`{value}` (type: {type(value)}) to endpoint {request_url}") async with self.session.post( - self.base_url + "/command", json={key: value} + self.base_url + "/command", data="{" + key + ": \"" + str(value) + "\"}" ) as response: data = await response.json(content_type=None) _LOGGER.debug(f"[{self}] Received local command result: {data}") From 023af449ceaad00ae117753dadf19ff2862373b3 Mon Sep 17 00:00:00 2001 From: alex Date: Thu, 14 Nov 2024 22:02:45 +1000 Subject: [PATCH 3/3] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D1=81=D0=B5=D0=BD=D1=81=D0=BE=D1=80=D0=B0?= =?UTF-8?q?=20"=D0=A2=D0=B5=D0=BC=D0=BF=D0=B5=D1=80=D0=B0=D1=82=D1=83?= =?UTF-8?q?=D1=80=D0=B0=20=D0=B2=20=D0=B2=D1=8B=D1=82=D1=8F=D0=B6=D0=BD?= =?UTF-8?q?=D0=BE=D0=BC=20=D0=BA=D0=B0=D0=BD=D0=B0=D0=BB=D0=B5"=20=D1=82.?= =?UTF-8?q?=D0=B5.=20=D1=8D=D1=82=D0=BE=20=D1=82=D0=B0=20=D1=82=D0=B5?= =?UTF-8?q?=D0=BC=D0=BF=D0=B5=D1=80=D0=B0=D1=82=D1=83=D1=80=D0=B0=20=D0=BA?= =?UTF-8?q?=D0=BE=D1=82=D0=BE=D1=80=D0=B0=D1=8F=20=D0=B2=20=D0=B4=D0=BE?= =?UTF-8?q?=D0=BC=D0=B5.=20=D0=A3=20=D0=A2=D1=83=D1=80=D0=BA=D0=BE=D0=B2?= =?UTF-8?q?=D0=B0=20=D1=8D=D1=82=D0=BE=20exh=5Ftemp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- custom_components/turkov/__init__.py | 1 + custom_components/turkov/api.py | 2 ++ custom_components/turkov/sensor.py | 7 +++++++ custom_components/turkov/translations/ru.json | 3 +++ 4 files changed, 13 insertions(+) diff --git a/custom_components/turkov/__init__.py b/custom_components/turkov/__init__.py index f2ef5a5..f8ab875 100644 --- a/custom_components/turkov/__init__.py +++ b/custom_components/turkov/__init__.py @@ -182,6 +182,7 @@ def _migrate_callback(ent: RegistryEntry) -> dict[str, Any] | None: "air_quality", "filter_life_percentage", "outdoor_temperature", + "exhaust_temperature", ): if ent.unique_id.endswith(postfix): return { diff --git a/custom_components/turkov/api.py b/custom_components/turkov/api.py index d345745..8b5853c 100644 --- a/custom_components/turkov/api.py +++ b/custom_components/turkov/api.py @@ -580,6 +580,7 @@ def _float_less(x): "indoor_temperature": ("in_temp", _float_less), "image_url": ("image", False), "indoor_humidity": ("in_humid", _float_less), + "exhaust_temperature": ("exh_temp", _float_less), "air_pressure": ("air_pres", float), "co2_level": ("CO2_level", float), "current_temperature": ("temp_curr", _float_less), @@ -669,6 +670,7 @@ def __init__( self.setup: Optional[str] = None self.air_pressure: Optional[float] = None self.indoor_humidity: Optional[float] = None + self.exhaust_temperature: Optional[float] = None self.co2_level: Optional[float] = None self.current_temperature: Optional[float] = None self.current_humidity: Optional[float] = None diff --git a/custom_components/turkov/sensor.py b/custom_components/turkov/sensor.py index 96ba531..ed5d26c 100644 --- a/custom_components/turkov/sensor.py +++ b/custom_components/turkov/sensor.py @@ -54,6 +54,13 @@ class TurkovSensorEntityDescription( state_class=SensorStateClass.MEASUREMENT, suggested_display_precision=0, ), + TurkovSensorEntityDescription( + key="exhaust_temperature", + name="Exhaust Temperature", + device_class=SensorDeviceClass.TEMPERATURE, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + ), ) diff --git a/custom_components/turkov/translations/ru.json b/custom_components/turkov/translations/ru.json index 5fa4065..5882e6d 100644 --- a/custom_components/turkov/translations/ru.json +++ b/custom_components/turkov/translations/ru.json @@ -76,6 +76,9 @@ }, "air_pressure": { "name": "Атмосферное давление" + }, + "exhaust_temperature": { + "name": "Температура вытяжного воздуха" } }, "switch": {