Smart light state showing as "unavailable"

Hi,

I have an issue I was hoping someone might be able to help with. I have an INNR smart light in the stairway controlled by 2 Aqara smart switches all connected by Zigbee2MQtt. The switch at the top of the stairs is hard-wired into the electrical cables connected to the light socket. The switch at the bottom of the stairs is a “wireless” switch. So when the switch at the bottom of the stairs is pressed, it toggles the state of the hard-wired switch at the top of the stairs via a Home Assistant automation. This works perfectly and has done for years.

I also have an automation which runs when the switch at the bottom of the stairs is double-clicked. The automation will cycle between 3 different levels of brightness for the smart light - ie from low → medium → high → low. This has also worked perfectly for years.

The automation has 2 triggers based on how the button is pressed on the wireless switch at the bottom of the stairs. A single click sets the “toggle” trigger, which then toggles the state of the upstairs hard-wired switch. A double click will set the “dim” trigger and then cycle through the different light brightness settings if the stairway light is on. But if the stairway light is off it will toggle the upstairs hard-wired switch to turn the stairway light on and then cycle through the different light brightness settings. This has also worked perfectly for years.

In the past month or so I have found the the automation for dimming the light is having issues. Specifically when the stairway light is off it’s status is showing as “unavailable”. If the stairway light is then turned on via the “toggle” automation, the light will turn on but the status of the light still shows as “unavailable” for about 5 minutes. So any attempt to run the “dim” automation will then fail until the state of the light changes from “unavailable” which takes about 5 minutes.

I have tried to modify the “dim” automation to run even if the status of the light is “unavailable” but that doesn’t work. Even though the light is actually on it still takes about 5 minutes for the status to change from “unavailable”.

Any idea what I’m doing wrong? As I said, these automations have worked perfectly for years but seem to have tanked in the past month or so. I’m happy to post any additional information to help troubleshoot if required.

Thanks,

Matt