- The device sends the information of the attribute 0x0008 (%)n and the attribute 0xF000 (status) in the same message.
The 0x0008 attribute is handled by the default libraries and they issue the status open or close and the %
I handle the 0xF000 attribute manually and it seems that the code to handle it manually is not executed when a message with multiple attributes proceeds, I don’t know if it will be because of this @nayelyz .
2022-10-17T08:23:15.850034150+00:00 INFO Zigbee Window Treatment Mc <ZigbeeDevice: 10b8dda6-1a26-4b9c-8866-fbd48d0a22d4 [0x3223] (Parents shutter)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0x3223, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: WindowCovering >, lqi: 0x6C, rssi: -73, body_length: 0x000B, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x35, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0008, DataType: Uint8, CurrentPositionLiftPercentage: 0x00 >, < AttributeRecord || AttributeId: 0xF000, DataType: Enum8, Enum8: 0x01 > > > >
2022-10-17T08:23:15.872967150+00:00 TRACE Zigbee Window Treatment Mc Found ZigbeeMessageDispatcher handler in zigbee_window_treatment
2022-10-17T08:23:15.880818483+00:00 INFO Zigbee Window Treatment Mc Executing ZclClusterAttributeValueHandler: cluster: WindowCovering, attribute: CurrentPositionLiftPercentage
2022-10-17T08:23:15.887305483+00:00 INFO Zigbee Window Treatment Mc <ZigbeeDevice: 10b8dda6-1a26-4b9c-8866-fbd48d0a22d4 [0x3223] (Parents shutter)> emitting event: {“attribute_id”:“shadeLevel”,“capability_id”:“windowShadeLevel”,“component_id”:“main”,“state”:{“value”:0}}
2022-10-17T08:23:15.957590816+00:00 INFO Zigbee Window Treatment Mc <ZigbeeDevice: 10b8dda6-1a26-4b9c-8866-fbd48d0a22d4 [0x3223] (Parents shutter)> emitting event: {“attribute_id”:“windowShade”,“capability_id”:“windowShade”,“component_id”:“main”,“state”:{“value”:“closed”}}
- In the second case, the message sends the attribute 0XF001 (Calibration status) and 0xF003 (Total calibration time).
Here the two attributes are handled manually, but it only executes the handler of the attribute 0xF003 and emits the total time only.
2022-10-17T08:23:26.119873154+00:00 INFO Zigbee Window Treatment Mc <ZigbeeDevice: 10b8dda6-1a26-4b9c-8866-fbd48d0a22d4 [0x3223] (Parents shutter)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0x3223, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: WindowCovering >, lqi: 0x74, rssi: -71, body_length: 0x000C, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x37, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0xF001, DataType: Enum8, Enum8: 0x01 >, < AttributeRecord || AttributeId: 0xF003, DataType: Uint16, Uint16: 0x00C7 > > > >
2022-10-17T08:23:26.144171154+00:00 TRACE Zigbee Window Treatment Mc Found ZigbeeMessageDispatcher handler in zigbee_window_treatment → Tuya Device Handler
2022-10-17T08:23:26.160699488+00:00 INFO Zigbee Window Treatment Mc Executing ZclClusterAttributeValueHandler: cluster: WindowCovering, attribute: 0xF003
2022-10-17T08:23:26.166457821+00:00 PRINT Zigbee Window Treatment Mc <<< Travel time Value >>> 199
2022-10-17T08:23:26.172431154+00:00 INFO Zigbee Window Treatment Mc <ZigbeeDevice: 10b8dda6-1a26-4b9c-8866-fbd48d0a22d4 [0x3223] (Parents shutter)> emitting event: {“attribute_id”:“deviceInfo”,“capability_id”:“legendabsolute60149.deviceInfo”,“component_id”:“main”,“state”:{“value”:“Calibration Total Time: 19.9 Sec”}}
These are the zigbee handlersdeclared in subdriver @nayelyz
zigbee_handlers = {
attr = {
[zcl_clusters.WindowCovering.ID] = {
[0xF000] = curtain_switch_handler
},
[zcl_clusters.WindowCovering.ID] = {
[0xF001] = accurate_calibration_handler
},
[zcl_clusters.WindowCovering.ID] = {
[0xF003] = travel_time_handler
}
}
},