Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.xiaomi_miio.fan.XiaomiAirFresh Class Reference
Inheritance diagram for homeassistant.components.xiaomi_miio.fan.XiaomiAirFresh:
[legend]
Collaboration diagram for homeassistant.components.xiaomi_miio.fan.XiaomiAirFresh:
[legend]

Public Member Functions

def __init__ (self, device, entry, unique_id, coordinator)
 
def async_reset_filter (self)
 
def async_set_extra_features (self, int features=1)
 
None async_set_percentage (self, int percentage)
 
None async_set_preset_mode (self, str preset_mode)
 
def operation_mode_class (self)
 
int|None percentage (self)
 
- Public Member Functions inherited from homeassistant.components.xiaomi_miio.fan.XiaomiGenericAirPurifier
str|None preset_mode (self)
 
int speed_count (self)
 
- Public Member Functions inherited from homeassistant.components.xiaomi_miio.fan.XiaomiGenericDevice
None async_turn_off (self, **Any kwargs)
 
None async_turn_on (self, int|None percentage=None, str|None preset_mode=None, **Any kwargs)
 
dict[str, Any] extra_state_attributes (self)
 
bool|None is_on (self)
 
list[strpreset_modes (self)
 
- Public Member Functions inherited from homeassistant.components.fan.FanEntity
Any __getattribute__ (self, str name)
 
None add_to_platform_start (self, HomeAssistant hass, EntityPlatform platform, asyncio.Semaphore|None parallel_updates)
 
None async_decrease_speed (self, int|None percentage_step=None)
 
None async_handle_set_preset_mode_service (self, str preset_mode)
 
None async_handle_turn_on_service (self, int|None percentage=None, str|None preset_mode=None, **Any kwargs)
 
None async_increase_speed (self, int|None percentage_step=None)
 
None async_oscillate (self, bool oscillating)
 
None async_set_direction (self, str direction)
 
dict[str, list[str]|Nonecapability_attributes (self)
 
str|None current_direction (self)
 
None oscillate (self, bool oscillating)
 
bool|None oscillating (self)
 
float percentage_step (self)
 
None set_direction (self, str direction)
 
None set_percentage (self, int percentage)
 
None set_preset_mode (self, str preset_mode)
 
dict[str, float|str|Nonestate_attributes (self)
 
FanEntityFeature supported_features (self)
 
None turn_on (self, int|None percentage=None, str|None preset_mode=None, **Any kwargs)
 
- Public Member Functions inherited from homeassistant.helpers.entity.ToggleEntity
None async_toggle (self, **Any kwargs)
 
None async_turn_on (self, **Any kwargs)
 
Literal["on", "off"]|None state (self)
 
None toggle (self, **Any kwargs)
 
None turn_off (self, **Any kwargs)
 
None turn_on (self, **Any kwargs)
 
- Public Member Functions inherited from homeassistant.helpers.entity.Entity
None __init_subclass__ (cls, **Any kwargs)
 
str __repr__ (self)
 
None add_to_platform_abort (self)
 
None add_to_platform_finish (self)
 
bool assumed_state (self)
 
None async_added_to_hass (self)
 
None async_device_update (self, bool warning=True)
 
None async_internal_added_to_hass (self)
 
None async_internal_will_remove_from_hass (self)
 
None async_on_remove (self, CALLBACK_TYPE func)
 
None async_registry_entry_updated (self)
 
None async_remove (self, *bool force_remove=False)
 
None async_removed_from_registry (self)
 
None async_schedule_update_ha_state (self, bool force_refresh=False)
 
None async_set_context (self, Context context)
 
None async_update_ha_state (self, bool force_refresh=False)
 
None async_will_remove_from_hass (self)
 
None async_write_ha_state (self)
 
str|None attribution (self)
 
bool available (self)
 
str|None device_class (self)
 
DeviceInfo|None device_info (self)
 
bool enabled (self)
 
EntityCategory|None entity_category (self)
 
str|None entity_picture (self)
 
bool entity_registry_enabled_default (self)
 
bool entity_registry_visible_default (self)
 
bool force_update (self)
 
HassJobType get_hassjob_type (self, str function_name)
 
er.EntityOptionsType|None get_initial_entity_options (self)
 
bool has_entity_name (self)
 
str|None icon (self)
 
str|UndefinedType|None name (self)
 
None schedule_update_ha_state (self, bool force_refresh=False)
 
bool should_poll (self)
 
str|None suggested_object_id (self)
 
str|None translation_key (self)
 
Mapping[str, strtranslation_placeholders (self)
 
str|None unique_id (self)
 
str|None unit_of_measurement (self)
 
bool use_device_name (self)
 
- Public Member Functions inherited from homeassistant.helpers.entity.CachedProperties
None __init__ (cls, str name, tuple[type,...] bases, dict[Any, Any] namespace, **Any kwargs)
 
Any __new__ (mcs, str name, tuple[type,...] bases, dict[Any, Any] namespace, set[str]|None cached_properties=None, **Any kwargs)
 

Static Public Attributes

dictionary PRESET_MODE_MAPPING
 
dictionary REVERSE_SPEED_MODE_MAPPING = {v: k for k, v in SPEED_MODE_MAPPING.items()}
 
dictionary SPEED_MODE_MAPPING
 
- Static Public Attributes inherited from homeassistant.components.fan.FanEntity
 bool
 
 FanEntityFeature
 
 int
 
 None
 
- Static Public Attributes inherited from homeassistant.helpers.entity.ToggleEntity
 None
 
- Static Public Attributes inherited from homeassistant.helpers.entity.Entity
 bool
 
 EntityPlatform
 
 HomeAssistant
 
 None
 
 StateInfo
 
 StateType
 
 str
 

Private Attributes

 _attr_supported_features
 
 _available_attributes
 
 _device_features
 
 _mode
 
 _preset_modes
 
 _speed_count
 
 _state
 

Additional Inherited Members

- Public Attributes inherited from homeassistant.helpers.entity.Entity
 device_entry
 
 entity_id
 
 hass
 
 parallel_updates
 
 platform
 
 registry_entry
 

Detailed Description

Representation of a Xiaomi Air Fresh.

Definition at line 702 of file fan.py.

Constructor & Destructor Documentation

◆ __init__()

def homeassistant.components.xiaomi_miio.fan.XiaomiAirFresh.__init__ (   self,
  device,
  entry,
  unique_id,
  coordinator 
)
Initialize the miio device.

Reimplemented from homeassistant.components.xiaomi_miio.fan.XiaomiGenericAirPurifier.

Definition at line 719 of file fan.py.

Member Function Documentation

◆ async_reset_filter()

def homeassistant.components.xiaomi_miio.fan.XiaomiAirFresh.async_reset_filter (   self)
Reset the filter lifetime and usage.

Definition at line 803 of file fan.py.

◆ async_set_extra_features()

def homeassistant.components.xiaomi_miio.fan.XiaomiAirFresh.async_set_extra_features (   self,
int   features = 1 
)
Set the extra features.

Definition at line 792 of file fan.py.

◆ async_set_percentage()

None homeassistant.components.xiaomi_miio.fan.XiaomiAirFresh.async_set_percentage (   self,
int  percentage 
)
Set the percentage of the fan.

This method is a coroutine.

Reimplemented from homeassistant.components.fan.FanEntity.

Definition at line 760 of file fan.py.

◆ async_set_preset_mode()

None homeassistant.components.xiaomi_miio.fan.XiaomiAirFresh.async_set_preset_mode (   self,
str  preset_mode 
)
Set the preset mode of the fan.

This method is a coroutine.

Reimplemented from homeassistant.components.fan.FanEntity.

Definition at line 779 of file fan.py.

◆ operation_mode_class()

def homeassistant.components.xiaomi_miio.fan.XiaomiAirFresh.operation_mode_class (   self)
Hold operation mode class.

Reimplemented from homeassistant.components.xiaomi_miio.fan.XiaomiGenericDevice.

Definition at line 744 of file fan.py.

◆ percentage()

int | None homeassistant.components.xiaomi_miio.fan.XiaomiAirFresh.percentage (   self)
Return the current percentage based speed.

Reimplemented from homeassistant.components.xiaomi_miio.fan.XiaomiGenericDevice.

Definition at line 749 of file fan.py.

Member Data Documentation

◆ _attr_supported_features

homeassistant.components.xiaomi_miio.fan.XiaomiAirFresh._attr_supported_features
private

Definition at line 727 of file fan.py.

◆ _available_attributes

homeassistant.components.xiaomi_miio.fan.XiaomiAirFresh._available_attributes
private

Definition at line 724 of file fan.py.

◆ _device_features

homeassistant.components.xiaomi_miio.fan.XiaomiAirFresh._device_features
private

Definition at line 723 of file fan.py.

◆ _mode

homeassistant.components.xiaomi_miio.fan.XiaomiAirFresh._mode
private

Definition at line 741 of file fan.py.

◆ _preset_modes

homeassistant.components.xiaomi_miio.fan.XiaomiAirFresh._preset_modes
private

Definition at line 726 of file fan.py.

◆ _speed_count

homeassistant.components.xiaomi_miio.fan.XiaomiAirFresh._speed_count
private

Definition at line 725 of file fan.py.

◆ _state

homeassistant.components.xiaomi_miio.fan.XiaomiAirFresh._state
private

Definition at line 734 of file fan.py.

◆ PRESET_MODE_MAPPING

dictionary homeassistant.components.xiaomi_miio.fan.XiaomiAirFresh.PRESET_MODE_MAPPING
static
Initial value:
= {
"Auto": AirfreshOperationMode.Auto,
"Interval": AirfreshOperationMode.Interval,
}

Definition at line 714 of file fan.py.

◆ REVERSE_SPEED_MODE_MAPPING

dictionary homeassistant.components.xiaomi_miio.fan.XiaomiAirFresh.REVERSE_SPEED_MODE_MAPPING = {v: k for k, v in SPEED_MODE_MAPPING.items()}
static

Definition at line 712 of file fan.py.

◆ SPEED_MODE_MAPPING

dictionary homeassistant.components.xiaomi_miio.fan.XiaomiAirFresh.SPEED_MODE_MAPPING
static
Initial value:
= {
1: AirfreshOperationMode.Silent,
2: AirfreshOperationMode.Low,
3: AirfreshOperationMode.Middle,
4: AirfreshOperationMode.Strong,
}

Definition at line 705 of file fan.py.


The documentation for this class was generated from the following file: