How I can configute MQTT in runtime?

hi!

I have a standalone device (without HASS) with enabled captive_portal option;

mqtt:
   broker: "192.168.88.63"
   id: mqtt_broker
   username: ""
   password: ""
text:
 - platform: template
   mode: text
   name: "MQTT address"
   id: "mqtt_address"
   icon: "mdi:text"
   optimistic: true
   internal: false
   entity_category: config
   initial_value: "192.168.88.63"
   restore_value: true
   on_value:
      then:
        - logger.log:
            format: "%s"
            args: ["x.c_str()"]

so. how I can configure MQTT IpAddress from lambda?

WBR, Oleg

    - lambda: !lambda id(mqtt_id).set_broker_address(id(broker_address));
    - mqtt.enable:

RTFM rulez!

1 Like