mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 15:47:12 +00:00
Fix point import error (#144462)
* fix import error * fix failing tests * Apply suggestions from code review --------- Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
This commit is contained in:
parent
e5c56629e2
commit
23244fb79f
@ -6,7 +6,6 @@ import logging
|
|||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from pypoint import PointSession
|
from pypoint import PointSession
|
||||||
from tempora.utc import fromtimestamp
|
|
||||||
|
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
|
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
|
||||||
@ -62,7 +61,9 @@ class PointDataUpdateCoordinator(DataUpdateCoordinator[dict[str, dict[str, Any]]
|
|||||||
or device.device_id not in self.device_updates
|
or device.device_id not in self.device_updates
|
||||||
or self.device_updates[device.device_id] < last_updated
|
or self.device_updates[device.device_id] < last_updated
|
||||||
):
|
):
|
||||||
self.device_updates[device.device_id] = last_updated or fromtimestamp(0)
|
self.device_updates[device.device_id] = (
|
||||||
|
last_updated or datetime.fromtimestamp(0)
|
||||||
|
)
|
||||||
self.data[device.device_id] = {
|
self.data[device.device_id] = {
|
||||||
k: await device.sensor(k)
|
k: await device.sensor(k)
|
||||||
for k in ("temperature", "humidity", "sound_pressure")
|
for k in ("temperature", "humidity", "sound_pressure")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user