Open biau opened 6 years ago
When switch is paired to zigate you could request manufacturer info. Easier solution might be to add configuration parameter for inverting ON and OFF states. Other good solution could be adding manufacturer and model parameters to config and using them on code.
I don't have aquara push button either, but https://zigate.fr/xiaomi-bouton-switch-cluster/ shows that 00 is ON and 01 is OFF.
I don't know why you've choose to flag state ON with 00 and OFF with 01 initially but this does not work with xiaomi wall switch connected to light (see https://community.home-assistant.io/t/new-custom-component-zigate/36820/282?u=biau ) With this changes wall switch works fine but I do not have aqara push button to see if this brake something. I did not find any attribute value in the zigbee message to differentiate switches types.