Clearer labelling and page organization for MQTT

This commit is contained in:
Jack Kingsman
2026-03-02 13:56:44 -08:00
parent 95bacc4caf
commit f059756064
4 changed files with 343 additions and 250 deletions
+6 -2
View File
@@ -20,8 +20,12 @@ class MqttPublisher(BaseMqttPublisher):
_log_prefix = "MQTT"
def _is_configured(self) -> bool:
"""Check if MQTT is configured (broker host is set)."""
return bool(self._settings and self._settings.mqtt_broker_host)
"""Check if MQTT is configured and has something to publish."""
return bool(
self._settings
and self._settings.mqtt_broker_host
and (self._settings.mqtt_publish_messages or self._settings.mqtt_publish_raw_packets)
)
def _build_client_kwargs(self, settings: AppSettings) -> dict[str, Any]:
return {