Hi, I am struggling with a problem I cannot solve. Sometimes my meross entities lose contact with home assistant and become unavailable. The problems gets solved restarting Home Assistant and Meross comes to live again.
This problem is common with another users and there is no solution yet from the creator of the component Alberto Geniola.
I am trying to automatize the rebooting with no success. Cannot play with null values, cannot play with triggers and conditions. I am not able to tell the home assistant to reboot if meross component goes down.
Can anyone help me? Thank you in advance and sorry for my “Spanglish”
You can use the trigger state and configure it so that it triggers if the entity state switches to unavailable (not null).
As an action you choose homeassistant.restart and thats it if I understand you right.
alias: reboot on unavailable
description: ''
trigger:
- platform: state
entity_id: input_boolean.test_switch
to: unavailable
condition: []
action:
- service: homeassistant.restart
mode: single
You can always go to the developer tools to see and play around with the states of each entity.
Does the Automation not trigger or is HA not restarting? Also in the Title you said “entity not found” but in your text you are saying unavailable. Could you describe what’s happening with more details?
No problem.
For me if an entity has this icon and says not available, it is still an entity with the state of unavailable
as I said, you can see that in the developer tools. How does your automation look like?
Templates and Automations are not the same. I meant the state tab of the developer tools where you can look up the state of the entity you want to use. Please format your code by going into an empty row and clicking </>. But the Automation you posted works fine at my end. The only thing I could imagine right now is that the state does not change if the entity becomes unavailable. Go to the developer tools next time it happens and check the state.
I am new to HA with little coding experience. I am interested in enabling this for my meross smart items. Could someone please talk me through how to add this code? TIA