예제 #1
0
    def preset_mode(self):
        """Get the active preset mode."""
        if self._state:
            preset_mode = AirpurifierMiotOperationMode(self._mode).name
            return preset_mode if preset_mode in self._preset_modes else None

        return None
예제 #2
0
    def speed(self):
        """Return the current speed."""
        if self._state:
            return AirpurifierMiotOperationMode(
                self._state_attrs[ATTR_MODE]).name

        return None
예제 #3
0
    def speed(self):
        """Return the current speed."""
        if self._state:
            return AirpurifierMiotOperationMode(self._mode).name

        return None