MQTT broker ip configure from home assistant

Hi,

Is there a way to use sensor from HA to configure the mqtt ip address? This is to allow replacing ip for all devices if needed, not by programming.

mqtt:
  broker: 192.168.0.12

Why not use a hostname and let dns do its thing?

You right! thx, changed it to hostname