Skip to content

Commit

Permalink
fix: use sane update interval
Browse files Browse the repository at this point in the history
update entities every 30 seconds
  • Loading branch information
bj00rn committed Dec 8, 2023
1 parent 072343d commit 2875136
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion custom_components/saleryd_hrv/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
)
from .coordinator import SalerydLokeDataUpdateCoordinator

SCAN_INTERVAL = timedelta(seconds=5)
SCAN_INTERVAL = timedelta(seconds=30)

_LOGGER: logging.Logger = logging.getLogger(__package__)

Expand Down
6 changes: 3 additions & 3 deletions custom_components/saleryd_hrv/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def turn_on(self, **kwargs) -> None:
{"value": self._state_when_on},
blocking=True,
)
self.schedule_update_ha_state(force_refresh=True)
self.schedule_update_ha_state()

def turn_off(self, **kwargs) -> None:
"""Turn on the switch."""
Expand All @@ -55,7 +55,7 @@ def turn_off(self, **kwargs) -> None:
{"value": self._state_when_off},
blocking=True,
)
self.schedule_update_ha_state(force_refresh=True)
self.schedule_update_ha_state()

@property
def extra_state_attributes(self):
Expand Down Expand Up @@ -86,7 +86,7 @@ class SalerydLokeCoolingModeBinarySwitch(SalerydLokeBinarySwitch):


class SalerydLokeVentilationModeBinarySwitch(SalerydLokeBinarySwitch):
"""Cooling switch class."""
"""Ventilation mode switch class."""

_service_turn_on = "set_ventilation_mode"
_service_turn_off = "set_ventilation_mode"
Expand Down

0 comments on commit 2875136

Please sign in to comment.