Is there any way to feed state changes in HASS to the MQTT product

I’d like to make my HASS system update my MQTT server when each of the sensors and switches change state. Is this something I can easily do?

I am not so sure but could you be more specific what you want to achieve?
There are already many MQTT components integrated in HA.

Please see link below, maybe one or more MQTT components here suite your situation:

I think what you want is essentially the same as this reply I gave to another thread this morning. Instead of sending an MQTT message when an input_select state changes, it will be when the sensor state changes. I still don’t know the YAML for it though.

@minida28: Thanks for the response - yes, it’s not clear. Basically, I want something to be able to subscribe outside of HASS to the updates my switches and sensors make (i.e. Light1 is off, PrinterA is idle, FredBloggs is no longer home)… but (hopefully) without going through and adding everything each time I add a new component.

@gpbenton: Also, thank you to you! Yes, something like that, but I’m not exactly sure how I’d do it for all the sensors I have.

I’m kinda toying around the edges of an idea, and I’m just not quite sure how I want it to go, which is, I think, why I’m struggling a bit to describe it!