mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 00:07:10 +00:00
Fix duplicate events in live history (#113896)
This commit is contained in:
parent
dfbfdf781e
commit
e74791083e
@ -5,7 +5,7 @@ from __future__ import annotations
|
|||||||
import asyncio
|
import asyncio
|
||||||
from collections.abc import Callable, Iterable, MutableMapping
|
from collections.abc import Callable, Iterable, MutableMapping
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from datetime import datetime as dt
|
from datetime import datetime as dt, timedelta
|
||||||
import logging
|
import logging
|
||||||
from typing import Any, cast
|
from typing import Any, cast
|
||||||
|
|
||||||
@ -564,7 +564,10 @@ async def ws_stream(
|
|||||||
hass,
|
hass,
|
||||||
connection,
|
connection,
|
||||||
msg_id,
|
msg_id,
|
||||||
last_event_time or start_time,
|
# Add one microsecond so we are outside the window of
|
||||||
|
# the last event we got from the database since otherwise
|
||||||
|
# we could fetch the same event twice
|
||||||
|
(last_event_time or start_time) + timedelta(microseconds=1),
|
||||||
subscriptions_setup_complete_time,
|
subscriptions_setup_complete_time,
|
||||||
entity_ids,
|
entity_ids,
|
||||||
False, # We don't want the start time state again
|
False, # We don't want the start time state again
|
||||||
|
Loading…
x
Reference in New Issue
Block a user