mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-08-04 13:47:37 +02:00
Cleanup mqtt
This commit is contained in:
parent
2edf3e30f5
commit
48a66b6b24
@ -11,7 +11,7 @@ from frigate.config import FrigateConfig
|
|||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class MqttClient(Communicator): # type: ignore[misc]
|
class MqttClient(Communicator):
|
||||||
"""Frigate wrapper for mqtt client."""
|
"""Frigate wrapper for mqtt client."""
|
||||||
|
|
||||||
def __init__(self, config: FrigateConfig) -> None:
|
def __init__(self, config: FrigateConfig) -> None:
|
||||||
@ -150,7 +150,7 @@ class MqttClient(Communicator): # type: ignore[misc]
|
|||||||
client: mqtt.Client,
|
client: mqtt.Client,
|
||||||
userdata: Any,
|
userdata: Any,
|
||||||
flags: Any,
|
flags: Any,
|
||||||
reason_code: mqtt.ReasonCode,
|
reason_code: mqtt.ReasonCode, # type: ignore[name-defined]
|
||||||
properties: Any,
|
properties: Any,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Mqtt connection callback."""
|
"""Mqtt connection callback."""
|
||||||
@ -182,7 +182,7 @@ class MqttClient(Communicator): # type: ignore[misc]
|
|||||||
client: mqtt.Client,
|
client: mqtt.Client,
|
||||||
userdata: Any,
|
userdata: Any,
|
||||||
flags: Any,
|
flags: Any,
|
||||||
reason_code: mqtt.ReasonCode,
|
reason_code: mqtt.ReasonCode, # type: ignore[name-defined]
|
||||||
properties: Any,
|
properties: Any,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Mqtt disconnection callback."""
|
"""Mqtt disconnection callback."""
|
||||||
|
@ -30,7 +30,7 @@ class MqttConfig(FrigateBaseModel):
|
|||||||
)
|
)
|
||||||
tls_client_key: Optional[str] = Field(default=None, title="MQTT TLS Client Key")
|
tls_client_key: Optional[str] = Field(default=None, title="MQTT TLS Client Key")
|
||||||
tls_insecure: Optional[bool] = Field(default=None, title="MQTT TLS Insecure")
|
tls_insecure: Optional[bool] = Field(default=None, title="MQTT TLS Insecure")
|
||||||
qos: Optional[int] = Field(default=0, title="MQTT QoS")
|
qos: int = Field(default=0, title="MQTT QoS")
|
||||||
|
|
||||||
@model_validator(mode="after")
|
@model_validator(mode="after")
|
||||||
def user_requires_pass(self, info: ValidationInfo) -> Self:
|
def user_requires_pass(self, info: ValidationInfo) -> Self:
|
||||||
|
Loading…
Reference in New Issue
Block a user