Closed stefan-schweiger closed 7 months ago
That would significantly increase the complexity of auto mapping capabilities in Homey (and make code maintenance hell). So at this stage I'm not willing to do that. A better solution would be if the expose in Z2M itself is changed from STATE (which is ON/OFF for 99% of the cases) to something else with OPEN/CLOSE/STOP enum.
Currently state is always a binary value (ON/OFF) but some zigbee2mqtt devices expose different values as states. For example this curtain driver exposes OPEN/CLOSE/STOP.
I was wondering if it is feasible to have an optional second parameter in the mapper function which contains either the device, the device settings or at least the homeyclass and have the mapper do different things per device class if needed. This way the state could be mapped to a different capability depending on the device class.