Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95468

Power outage recovery - automation trigger when switch is OFF on boot

$
0
0

@aniemiec wrote:

Hey, I have a multiple Xiaomi Aqara walls witches working in decoupled mode driven by zigbee2mqtt software. The only problem with the setup is that after power outage decoupled switches requires me to turn their relays on so the Home Assistant can control wifi enabled lights.

To solve this problem I have the automation that enables all relays when they turn off but it’s not enough:

- alias: "Force turn on switch.corridor_wall"
  trigger:
    platform: state
    entity_id:
      - switch.corridor_wall
    to: "off"
  action:
    - delay: "00:00:01"
    - service: switch.turn_on
      data:
        entity_id: "switch.corridor_wall"

It doesn’t work after boot because the sitch is OFF and does not “change to OFF”. How can I solve this? Is there a trigger that works when the switch is OFF? Or can I somehow check if switch is OFF at boot and set it as a trigger?

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95468

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>