Long time HA user, but stalled w/ dynamic living arrangements. Back in the game.
Never had any MQTT devices before until now.
My automation so far work fine, but I have MQTT garage and didn’t realize the state was found in the attributes of the mQTT cover in HA.
So I initially just used the MQTT broker for my automations?
Whats the best practice? Directly engage the MQTT broker or stick w/ HA state changes…etc?
On the one hand, the more links in the chain the more fragile it is. If your HA service dies, anything that relies on it dies. I have processes that go Google Home -> IFTTT -> Web server -> MQTT -> NR -> HA -> device. And fragility is not uncommon. Having said that, your HA, MQTT broker and NR are possibly on the same device, so how often does HA die without the others going too. And most of the time, the problems are not HA/NR/MQTT anyway.
On the other hand, MQTT from devices are device-specific. HA provides a level of abstraction, so that if you replace the device, you have a chance of updating HA to match the old entities, and NR will just work.
My preference is HA as the hub for all the devices, and NR to automate them. That way I know where to start looking. And I use MQTT extensively to decouple one part of the system from another.
Cool. Yeah just trying to keep as ‘consistent’ as possible. For maintenance sake if anything just wasn’t sure anything down the road about using direct MQTT that would bite me or some factor hadnt considered / encountered yet that may give pause.