mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 21:25:13 +02:00
Requesting data from last seven days (#49485)
This commit is contained in:
@@ -774,8 +774,12 @@ class DataManager:
|
||||
async def async_get_measures(self) -> dict[MeasureType, Any]:
|
||||
"""Get the measures data."""
|
||||
_LOGGER.debug("Updating withings measures")
|
||||
now = dt.utcnow()
|
||||
startdate = now - datetime.timedelta(days=7)
|
||||
|
||||
response = await self._hass.async_add_executor_job(self._api.measure_get_meas)
|
||||
response = await self._hass.async_add_executor_job(
|
||||
self._api.measure_get_meas, None, None, startdate, now, None, startdate
|
||||
)
|
||||
|
||||
# Sort from oldest to newest.
|
||||
groups = sorted(
|
||||
|
Reference in New Issue
Block a user