Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
11.2k stars 1.6k forks source link

Dry Relay triggers to ON when Z2M restarts #22371

Closed Drakot closed 2 weeks ago

Drakot commented 2 weeks ago

What happened?

When rebooting Zigbee2MQTT container my Tuya Dry Relay triggers with an ON value, it inmediatly goes back to OFF. I use it for a Garage, so it opens (that's a problem)

What did you expect to happen?

When it restarts it should publish OFF value as it shows in the state.json

{
        "state": "OFF",
        "power_on_behavior": "off",
        "linkquality": 54
    }

How to reproduce it (minimal and precise)

Just restart the docker container and it triggers the ON value.

Zigbee2MQTT version

1.36.1

Adapter firmware version

20230507

Adapter

Sonoff ZBDongle-P

Setup

Docker

Debug log

Just after restart i see this LOG:

Zigbee2MQTT:info 2024-05-01 17:23:06: MQTT publish: topic 'zigbee2mqtt/Garage', payload '{"linkquality":47,"power_on_behavior":"off","state":"ON"}'

Drakot commented 2 weeks ago

Same issue https://github.com/Koenkk/zigbee2mqtt/issues/4477

I fixed it sending a retain TRUE MQTT message with the state OFF. I added to a HA automation just in case this happens again.