Unavailable Entity turning On when it returns

I’ve just been experiencing the same issue, but the solution is not simple

I have a momentary Z-wave switch which controls my blinds - I don’t know why it becomes unavailable, but it does every now and then (I didn’t do any kind of function at 8.36 in the morning)

Irrespective, when it returns it returns with the status On, which starts my automation (it’s a momentary switch)

Obviously, the ideal solution would for it not to go unavailable, but I can’t see where that is occurring, so is there any way I make the state something else when it comes back from unavailable?

Alternatively, is there any way that I can avoid it triggering on the return?

Change your automation trigger.

Going from unavailable to on will not trigger this:

  - platform: state
    from: 'off'
    to: 'on'
1 Like

That would be fine, if it ever went off… it mostly just sits “on” and sends another “on” trigger when the switch is pressed
I think i’ve worked around it with having it check previous state is not unavailable before it triggers the on

Yeah that’s the other way:

  - platform: state
    to: 'on'
    not_from: 'unknown'