mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 07:37:34 +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
bbc3862fec
commit
3c4c3dc08e
@ -6,7 +6,6 @@ import logging
|
||||
from typing import Any
|
||||
|
||||
from pypoint import PointSession
|
||||
from tempora.utc import fromtimestamp
|
||||
|
||||
from homeassistant.core import HomeAssistant
|
||||
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 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] = {
|
||||
k: await device.sensor(k)
|
||||
for k in ("temperature", "humidity", "sound_pressure")
|
||||
|
Loading…
x
Reference in New Issue
Block a user