2022-07-14 16:09:09 +00:00
|
|
|
"""MQTT Discovery data."""
|
2024-03-08 15:36:11 +00:00
|
|
|
|
2022-07-14 16:09:09 +00:00
|
|
|
from dataclasses import dataclass
|
|
|
|
|
|
|
|
from homeassistant.data_entry_flow import BaseServiceInfo
|
|
|
|
|
2024-05-17 12:42:21 +00:00
|
|
|
type ReceivePayloadType = str | bytes
|
2022-07-14 16:09:09 +00:00
|
|
|
|
|
|
|
|
2023-04-11 17:58:28 +00:00
|
|
|
@dataclass(slots=True)
|
2022-07-14 16:09:09 +00:00
|
|
|
class MqttServiceInfo(BaseServiceInfo):
|
|
|
|
"""Prepared info from mqtt entries."""
|
|
|
|
|
|
|
|
topic: str
|
|
|
|
payload: ReceivePayloadType
|
|
|
|
qos: int
|
|
|
|
retain: bool
|
|
|
|
subscribed_topic: str
|
2024-04-26 00:09:54 +00:00
|
|
|
timestamp: float
|