Skip to content

Commit 725759d

Browse files
committed
standalone: communication config: allow overriding MQTT host
1 parent c5f1e83 commit 725759d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/enapter/standalone/config.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ def from_env(
4343
) -> Self:
4444
prefix = namespace + "STANDALONE_COMMUNICATION_"
4545
blob = env[prefix + "CONFIG"]
46-
return cls.from_blob(blob)
46+
config = cls.from_blob(blob)
47+
override_mqtt_host = env.get(prefix + "OVERRIDE_MQTT_HOST")
48+
if override_mqtt_host is not None:
49+
config.mqtt.host = override_mqtt_host
50+
return config
4751

4852
@classmethod
4953
def from_blob(cls, blob: str) -> Self:

0 commit comments

Comments
 (0)