mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Another SIA fix for timestamp not present. (#53045)
This commit is contained in:
parent
5ff9c3e611
commit
f07d64c813
@ -25,7 +25,9 @@ def get_attr_from_sia_event(event: SIAEvent) -> dict[str, Any]:
|
|||||||
ATTR_CODE: event.code,
|
ATTR_CODE: event.code,
|
||||||
ATTR_MESSAGE: event.message,
|
ATTR_MESSAGE: event.message,
|
||||||
ATTR_ID: event.id,
|
ATTR_ID: event.id,
|
||||||
ATTR_TIMESTAMP: event.timestamp.isoformat(),
|
ATTR_TIMESTAMP: event.timestamp.isoformat()
|
||||||
|
if event.timestamp
|
||||||
|
else utcnow().isoformat(),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user