Skip to content

Commit

Permalink
fix: adjust times for refresh, ping and timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeFoodPixels committed Feb 27, 2024
1 parent 3e2b923 commit 96a155d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion custom_components/robovac/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
DOMAIN = "robovac"
CONF_VACS = "vacuums"
CONF_AUTODISCOVERY = "autodiscovery"
REFRESH_RATE = 20
REFRESH_RATE = 60
PING_RATE = 10
TIMEOUT = 5
6 changes: 3 additions & 3 deletions custom_components/robovac/vacuum.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
)

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 (
Expand Down Expand Up @@ -285,8 +285,8 @@ def __init__(self, item) -> None:
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,
)
Expand Down

0 comments on commit 96a155d

Please sign in to comment.