mirror of
https://github.com/home-assistant/core.git
synced 2025-09-08 06:11:31 +02:00
Remove unused constants in Husqvarna Automower (#151205)
This commit is contained in:
@@ -30,9 +30,8 @@ _LOGGER = logging.getLogger(__name__)
|
|||||||
MAX_WS_RECONNECT_TIME = 600
|
MAX_WS_RECONNECT_TIME = 600
|
||||||
SCAN_INTERVAL = timedelta(minutes=8)
|
SCAN_INTERVAL = timedelta(minutes=8)
|
||||||
DEFAULT_RECONNECT_TIME = 2 # Define a default reconnect time
|
DEFAULT_RECONNECT_TIME = 2 # Define a default reconnect time
|
||||||
PONG_TIMEOUT = timedelta(seconds=90)
|
PING_INTERVAL = 60
|
||||||
PING_INTERVAL = timedelta(seconds=10)
|
|
||||||
PING_TIMEOUT = timedelta(seconds=5)
|
|
||||||
type AutomowerConfigEntry = ConfigEntry[AutomowerDataUpdateCoordinator]
|
type AutomowerConfigEntry = ConfigEntry[AutomowerDataUpdateCoordinator]
|
||||||
|
|
||||||
|
|
||||||
@@ -206,7 +205,7 @@ class AutomowerDataUpdateCoordinator(DataUpdateCoordinator[MowerDictionary]):
|
|||||||
self.websocket_alive = await self.api.send_empty_message()
|
self.websocket_alive = await self.api.send_empty_message()
|
||||||
_LOGGER.debug("Ping result: %s", self.websocket_alive)
|
_LOGGER.debug("Ping result: %s", self.websocket_alive)
|
||||||
|
|
||||||
await asyncio.sleep(60)
|
await asyncio.sleep(PING_INTERVAL)
|
||||||
_LOGGER.debug("Websocket alive %s", self.websocket_alive)
|
_LOGGER.debug("Websocket alive %s", self.websocket_alive)
|
||||||
if not self.websocket_alive:
|
if not self.websocket_alive:
|
||||||
_LOGGER.debug("No pong received → restart polling")
|
_LOGGER.debug("No pong received → restart polling")
|
||||||
|
Reference in New Issue
Block a user