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
def speed(self): """Return the current speed.""" if self._state: return AirpurifierMiotOperationMode( self._state_attrs[ATTR_MODE]).name return None
def speed(self): """Return the current speed.""" if self._state: return AirpurifierMiotOperationMode(self._mode).name return None