mirror of
https://github.com/home-assistant/core.git
synced 2025-07-04 03:47:09 +00:00
Remove unneeded time fetch in mqtt discovery (#118208)
This commit is contained in:
parent
25f199c39c
commit
c391d73fec
@ -135,7 +135,7 @@ async def async_start( # noqa: C901
|
|||||||
@callback
|
@callback
|
||||||
def async_discovery_message_received(msg: ReceiveMessage) -> None: # noqa: C901
|
def async_discovery_message_received(msg: ReceiveMessage) -> None: # noqa: C901
|
||||||
"""Process the received message."""
|
"""Process the received message."""
|
||||||
mqtt_data.last_discovery = time.monotonic()
|
mqtt_data.last_discovery = msg.timestamp
|
||||||
payload = msg.payload
|
payload = msg.payload
|
||||||
topic = msg.topic
|
topic = msg.topic
|
||||||
topic_trimmed = topic.replace(f"{discovery_topic}/", "", 1)
|
topic_trimmed = topic.replace(f"{discovery_topic}/", "", 1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user