M5-T08: add MQTT, HA Discovery, and Modbus polling config fields

This commit is contained in:
2026-06-22 14:27:21 +02:00
parent 68165f0e01
commit 14b846549e
5 changed files with 206 additions and 2 deletions
+13 -1
View File
@@ -41,9 +41,21 @@ class Settings(BaseSettings):
auth_trust_forwarded_for: bool = False
auth_totp_issuer: str = "" # defaults to app_name when empty
# Modbus polling — global kill-switch; T08 will wire this into CONFIG_FIELDS/UI.
# Modbus polling — global kill-switch (CONFIG_FIELDS registered in T08).
modbus_polling_enabled: bool = True
# MQTT broker connection (T08 wires into CONFIG_FIELDS/UI; T10 builds the client).
mqtt_enabled: bool = False
mqtt_broker_host: str = ""
mqtt_broker_port: int = 1883
mqtt_username: str = ""
mqtt_password: str = ""
mqtt_tls_enabled: bool = False
# Home Assistant MQTT Discovery (T08 wires into CONFIG_FIELDS/UI; T11 does publishing).
ha_discovery_enabled: bool = False
ha_discovery_prefix: str = "homeassistant"
model_config = SettingsConfigDict(
env_file=".env",
env_file_encoding="utf-8",