Skip to content

Commit

Permalink
fix: interpolate updates instead of dropping old ones
Browse files Browse the repository at this point in the history
  • Loading branch information
muhlba91 committed Dec 12, 2023
1 parent 050d52c commit 28bc0ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 6 additions & 4 deletions custom_components/hella_onyx/sensors/shutter.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,12 @@ def _start_moving_device(self, animation: AnimationValue):
)

if moving:
track_point_in_utc_time(
self.hass,
self._end_moving_device,
utcnow() + timedelta(seconds=delta + INCREASED_INTERVAL_DELTA),
asyncio.run_coroutine_threadsafe(
track_point_in_utc_time(
self.hass,
self._end_moving_device,
utcnow() + timedelta(seconds=delta + INCREASED_INTERVAL_DELTA),
)
)
else:
_LOGGER.debug("end moving device %s due to too old data", self._uuid)
Expand Down
1 change: 0 additions & 1 deletion tests/sensors/test_light.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import pytest
import time
from math import ceil
import pytz
from datetime import datetime
from homeassistant.components.light import (
Expand Down

0 comments on commit 28bc0ce

Please sign in to comment.