I have a coffee maker connected to the Aqara plug which I turn on/off with a button also from Aqara. The problem is that when I restart HA, the plug turns on and I have to turn it off with the button. What is the reason? It is under MQTT
Do you have any automations that use that plug? All I can think of is a trigger that has a to: on with no from: clause that is firing.
If, on the button, when the “Action” changes state, the action on the plug is to toggle the state
You have to use
not_from: 'unavailable'
or add a condition
condition:
- condition: template
value_template: "{{ trigger.from_state.state not in ['unknown', 'unavailable'] }}"
1 Like
Thanks for your help. I have restarted HA and the plug has not turned on. The only thing I had to press the button twice to turn on the plug. After this it works correctly.