def percentage(self):
        """Return the current speed as a percentage."""
        try:
            return super().percentage
        except ValueError:
            return None
Return the current speed as a percentage.
custom_components/xiaomi_miot/fan.py