From 1ab7a7b84c5ed959426fbc620d93413063706306 Mon Sep 17 00:00:00 2001 From: Eirik Z Date: Fri, 12 Jan 2024 11:54:19 +0100 Subject: [PATCH] Python311 --- custom_components/climate_ip/climate.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/custom_components/climate_ip/climate.py b/custom_components/climate_ip/climate.py index a6f59d9..a52445d 100755 --- a/custom_components/climate_ip/climate.py +++ b/custom_components/climate_ip/climate.py @@ -161,10 +161,10 @@ async def async_service_handler(service): if not hasattr(device, "async_set_custom_operation"): continue await getattr(device, "async_set_custom_operation")(**params) - update_tasks.append(device.async_update_ha_state(True)) + update_tasks.append(asyncio.create_task(device.async_update_ha_state(True))) if update_tasks: - await asyncio.wait(update_tasks, loop=hass.loop) + await asyncio.wait(update_tasks) service_schema = ( device_controller.service_schema_map @@ -258,7 +258,7 @@ def unique_id(self): if self._unique_id is None: name_value = self._name _LOGGER.info("About to set unique id {}".format(name_value)) - self._unique_id = "climate_ip_" + name_value + self._unique_id = "climate_ip_" + str(name_value) _LOGGER.info("Returning unique id of {}".format(self._unique_id)) return self._unique_id