I’m using a curtain motor. It will disappear from the entity list once in a while but it will come back after I reboot Pi. I notice there is a message about it in the log:
You are using a custom component for cover.hassmart which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
It could be the problem of the motor itself. The only way I can think of is to config an automation and reboot automatically. Since the entity has disappeared, I don’t know how to trigger an automation from it, but I try the following template in the developer tools section and is appears as “True”:
{{ states(‘cover.hassmart_192_168_2_76’) == ‘unknown’ }}
So I config the automation below but it never triggers.
- alias: reboot_at_curtain_motor_lost
hide_entity: false
initial_state: on
trigger:
platform: template
value_template: “{{ states(‘cover.hassmart_192_168_2_76’) == ‘unknown’ }}”
action:
- service: shell_command.reboot_pi
The service “shell_command.reboot_pi” is a shell command I put in the configuration.yaml
> shell_command:
> reboot_pi: '/usr/bin/sudo /sbin/shutdown -r now'
I can manually trigger the automation “reboot_at_curtain_motor_lost” and Pi do reboot. But I can’t figure out why I can’t trigger.
Could you guys please help me, What is wrong with my configuration? Is there any better ways to trigger the automation? Thanks very much!!