Since there is no children allowed in Zigbee edge drivers, I implemented an edge driver for Aqara dual relay module with multiple components.
The device has 3 switches
- under main component (this switch controls both channels)
- under switch1 (controls gang 1, i.e. the first relay)
- under switch2 (controls the second relay)
It works pretty well overall, but in automation actions, it is not possible to unselect the first component.
This basically means that the second relay can not be used effectively in automation.
The device profile looks basically like this:
name: Zigbee Switch Power Energy Meter (YG) components: - id: main capabilities: - id: switch version: 1 - id: powerMeter version: 1 ... <here other supported capabilities, like energy, current and temperature measurements, etc ... - id: switch1 capabilities: - id: switch version: 1 - id: switch2 capabilities: - id: switch version: 1
In automation condition view (aka IF) all capabilities are shown flat, so it is possible to provide condition on any switch (or any capability under any component).
However, in automation action view, the capabilities are organized in sections/groups and the first “Turn on” is always selected automatically and can not be unselected.
Any ideas would be greatly appreciated.
Automation condition view
Automation action view
( Two actions are selected and there is no way to unselect the first one. In fact, once the user selects some action inside the group, it can no longer be unselected )