1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-20 02:48:57 +00:00

Adds a delay to the continuous control of the climate (#151177)

Co-authored-by: yunseon.park <yunseon.park@lge.com>
This commit is contained in:
LG-ThinQ-Integration
2025-12-18 22:46:11 +09:00
committed by GitHub
parent 4dd3abb16a
commit 6c944d6b15

View File

@@ -2,6 +2,7 @@
from __future__ import annotations from __future__ import annotations
import asyncio
import logging import logging
from typing import Any from typing import Any
@@ -241,6 +242,7 @@ class ThinQClimateEntity(ThinQEntity, ClimateEntity):
# If device is off, turn on first. # If device is off, turn on first.
if not self.data.is_on: if not self.data.is_on:
await self.async_turn_on() await self.async_turn_on()
await asyncio.sleep(2)
_LOGGER.debug( _LOGGER.debug(
"[%s:%s] async_set_hvac_mode: %s", "[%s:%s] async_set_hvac_mode: %s",
@@ -324,10 +326,11 @@ class ThinQClimateEntity(ThinQEntity, ClimateEntity):
# If device is off, turn on first. # If device is off, turn on first.
if not self.data.is_on: if not self.data.is_on:
await self.async_turn_on() await self.async_turn_on()
await asyncio.sleep(2)
if hvac_mode and hvac_mode != self.hvac_mode: if hvac_mode and hvac_mode != self.hvac_mode:
await self.async_set_hvac_mode(HVACMode(hvac_mode)) await self.async_set_hvac_mode(HVACMode(hvac_mode))
await asyncio.sleep(2)
_LOGGER.debug( _LOGGER.debug(
"[%s:%s] async_set_temperature: %s", "[%s:%s] async_set_temperature: %s",
self.coordinator.device_name, self.coordinator.device_name,