mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-07-30 13:48:07 +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__)
|
||||
|
||||
|
||||
class MqttClient(Communicator): # type: ignore[misc]
|
||||
class MqttClient(Communicator):
|
||||
"""Frigate wrapper for mqtt client."""
|
||||
|
||||
def __init__(self, config: FrigateConfig) -> None:
|
||||
@ -150,7 +150,7 @@ class MqttClient(Communicator): # type: ignore[misc]
|
||||
client: mqtt.Client,
|
||||
userdata: Any,
|
||||
flags: Any,
|
||||
reason_code: mqtt.ReasonCode,
|
||||
reason_code: mqtt.ReasonCode, # type: ignore[name-defined]
|
||||
properties: Any,
|
||||
) -> None:
|
||||
"""Mqtt connection callback."""
|
||||
@ -182,7 +182,7 @@ class MqttClient(Communicator): # type: ignore[misc]
|
||||
client: mqtt.Client,
|
||||
userdata: Any,
|
||||
flags: Any,
|
||||
reason_code: mqtt.ReasonCode,
|
||||
reason_code: mqtt.ReasonCode, # type: ignore[name-defined]
|
||||
properties: Any,
|
||||
) -> None:
|
||||
"""Mqtt disconnection callback."""
|
||||
|
@ -30,7 +30,7 @@ class MqttConfig(FrigateBaseModel):
|
||||
)
|
||||
tls_client_key: Optional[str] = Field(default=None, title="MQTT TLS Client Key")
|
||||
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")
|
||||
def user_requires_pass(self, info: ValidationInfo) -> Self:
|
||||
|
Loading…
Reference in New Issue
Block a user