Hello,
I have two MQTT topics already working correctly on external Mosquitto. They can be also read properly by MQTT devise on HASS.
I would like to synchronize them permanently in HASS.
I tried to put below in automation.yaml but I found two problems:
1.Even the one side automation like below doesn’t work
2.I guess putting reverse automation (topic 2 as trigger and trigeer 1 as action) will cause infinite loop of sending MQTT message between this two topics.
@reef-actor thank you for idea, but this is also one way sync. Is it possible to add additional reverse automation cabinet_b as condition and cabinet_a as action? Wouldn’t cause to toggle devices infinitely ?
Yes, it should work if you add a copy of it with the switches the other way around. The condition value_template: '{{ states("switch.cabinets_b") != trigger.to_state.state }}' prevents the other switch from being toggled if it is already in the same state so there will be no inifnite looping.
when you created your bathroom light entity and your shelly switch entity you got two entity id’s - one light (that we talked about in the other thread) and one switch that I don’t know what you called it so you’ll have to figure that part out.