Hi everyone, I’m currently trying to configure a Tasmota device in my smart home setup, but I’m running into some issues with the status display. I’ve set up the device to control a fan, which has four states: 0 (off), 1, 2, and 3 (on). The goal is to have the fan’s status reflected accurately in my HABPanel interface, changing the icon color based on whether it’s on or off.
I’ve successfully implemented a similar setup for a light switch, where the icon changes color when the device is on or off. However, when I tried to replicate this for the fan, the icon color doesn’t switch to the off state as expected. I’ve double-checked the code, and it seems identical to the working light switch setup, but for some reason, it’s not functioning the same way.
Here’s the code I’m using for the fan:
html
Despite this, the icon remains in the on state, even when the fan is off. I suspect there might be an issue with how the state is being interpreted or displayed, but I’m not sure where to look. Has anyone encountered a similar issue with Tasmota devices or HABPanel? Any advice or suggestions would be greatly appreciated. Thanks in advance for your help!