def _parse_attributes(self, value):
        """Parse non standard atrributes."""
        from zigpy.zcl import foundation as f
        attributes = {}
        attribute_names = {
            1: BATTERY_VOLTAGE_MV,
            3: TEMPERATURE,
            4: XIAOMI_ATTR_4,
            5: XIAOMI_ATTR_5,
            6: XIAOMI_ATTR_6,
            10: PATH
        }
        result = {}
        while value:
            skey = int(value[0])
            svalue, value = f.TypeValue.deserialize(value[1:])
            result[skey] = svalue.value
        for item, value in result.items():
            key = attribute_names[item] \
                if item in attribute_names else "0xff01-" + str(item)
            attributes[key] = value
        if BATTERY_VOLTAGE_MV in attributes:
            attributes[BATTERY_LEVEL] = int(
                self._calculate_remaining_battery_percentage(
                    attributes[BATTERY_VOLTAGE_MV]
                )
            )
        return attributes
def _parse_attributes ( self , value ) : from zigpy . zcl import foundation as f attributes = { } attribute_names = { 1 : BATTERY_VOLTAGE_MV , 3 : TEMPERATURE , 4 : XIAOMI_ATTR_4 , 5 : XIAOMI_ATTR_5 , 6 : XIAOMI_ATTR_6 , 10 : PATH } result = { } while value : skey = int ( value [ 0 ] ) svalue , value = f . TypeValue . deserialize ( value [ 1 : ] ) result [ skey ] = svalue . value for item , value in result . items ( ) : key = attribute_names [ item ] if item in attribute_names else "0xff01-" + str ( item ) attributes [ key ] = value if BATTERY_VOLTAGE_MV in attributes : attributes [ BATTERY_LEVEL ] = int ( self . _calculate_remaining_battery_percentage ( attributes [ BATTERY_VOLTAGE_MV ] ) ) return attributes
Parse non standard atrributes.