fix: adjust times for refresh, ping and timeout

This commit is contained in:
Luke Bonaccorsi 2024-02-27 14:39:01 +00:00
parent 3e2b923255
commit 96a155d378
2 changed files with 6 additions and 4 deletions

View File

@ -3,4 +3,6 @@
DOMAIN = "robovac"
CONF_VACS = "vacuums"
CONF_AUTODISCOVERY = "autodiscovery"
REFRESH_RATE = 20
REFRESH_RATE = 60
PING_RATE = 10
TIMEOUT = 5

View File

@ -56,7 +56,7 @@ from homeassistant.const import (
)
from .tuyalocalapi import TuyaException
from .const import CONF_VACS, DOMAIN, REFRESH_RATE
from .const import CONF_VACS, DOMAIN, REFRESH_RATE, PING_RATE, TIMEOUT
from .errors import getErrorMessage
from .robovac import (
@ -285,8 +285,8 @@ class RoboVacEntity(StateVacuumEntity):
device_id=self.unique_id,
host=self.ip_address,
local_key=self.access_token,
timeout=2,
ping_interval=REFRESH_RATE / 2,
timeout=TIMEOUT,
ping_interval=PING_RATE,
model_code=self.model_code[0:5],
update_entity_state=self.pushed_update_handler,
)