def percentage(self):
        """Return speed percentage of the fan."""
        if (self._speed == SPEED_OFF):
            return 0

        return ordered_list_item_to_percentage(self._speed_list, self._speed)
Return speed percentage of the fan.
custom_components/smartir/fan.py