def METHOD_NAME(self, attrid, value):
    self.debug("Updating attribute on Xiaomi cluster %s with %s", attrid, value)
    if attrid == BATTERY_PERCENTAGE:
        self.endpoint.power.battery_percent_reported(value)
    elif attrid == SYSTEM_MODE:
        # update ZCL system_mode attribute (e.g. on attribute reports)
        self.endpoint.thermostat.update_attribute(
            ZCL_SYSTEM_MODE, XIAOMI_SYSTEM_MODE_MAP[value]
        )
    super().METHOD_NAME(attrid, value)