Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat Class Reference
Inheritance diagram for homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat:
[legend]
Collaboration diagram for homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat:
[legend]

Public Member Functions

None __init__ (self, HomeAssistant hass, str name, str switch_entity_id, str sensor_entity_id, float|None min_humidity, float|None max_humidity, float|None target_humidity, HumidifierDeviceClass|None device_class, timedelta|None min_cycle_duration, float dry_tolerance, float wet_tolerance, timedelta|None keep_alive, bool|None initial_state, int|None away_humidity, bool|None away_fixed, timedelta|None sensor_stale_duration, str|None unique_id)
 
None async_added_to_hass (self)
 
None async_set_humidity (self, int humidity)
 
None async_set_mode (self, str mode)
 
None async_turn_off (self, **Any kwargs)
 
None async_turn_on (self, **Any kwargs)
 
None async_will_remove_from_hass (self)
 
bool available (self)
 
list[str]|None available_modes (self)
 
float|None current_humidity (self)
 
HumidifierDeviceClass device_class (self)
 
dict[str, Any]|None extra_state_attributes (self)
 
bool|None is_on (self)
 
float max_humidity (self)
 
float min_humidity (self)
 
str|None mode (self)
 
str name (self)
 
float|None target_humidity (self)
 
- Public Member Functions inherited from homeassistant.components.humidifier.HumidifierEntity
HumidifierAction|None action (self)
 
dict[str, Any] capability_attributes (self)
 
None set_humidity (self, int humidity)
 
None set_mode (self, str mode)
 
dict[str, Any] state_attributes (self)
 
HumidifierEntityFeature supported_features (self)
 
HumidifierEntityFeature supported_features_compat (self)
 
- Public Member Functions inherited from homeassistant.helpers.entity.ToggleEntity
None async_toggle (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)
 
None add_to_platform_start (self, HomeAssistant hass, EntityPlatform platform, asyncio.Semaphore|None parallel_updates)
 
bool assumed_state (self)
 
None async_device_update (self, bool warning=True)
 
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_write_ha_state (self)
 
str|None attribution (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)
 
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)
 
- Public Member Functions inherited from homeassistant.helpers.restore_state.RestoreEntity
ExtraStoredData|None async_get_last_extra_data (self)
 
State|None async_get_last_state (self)
 
None async_internal_added_to_hass (self)
 
None async_internal_will_remove_from_hass (self)
 
ExtraStoredData|None extra_restore_state_data (self)
 

Private Member Functions

None _async_device_turn_off (self)
 
None _async_device_turn_on (self)
 
None _async_operate (self, datetime|None time=None, bool force=False)
 
None _async_sensor_event (self, Event[EventStateChangedData]|Event[EventStateReportedData] event)
 
None _async_sensor_not_responding (self, datetime|None now=None)
 
None _async_sensor_update (self, State new_state)
 
None _async_switch_changed (self, State|None new_state)
 
None _async_switch_event (self, Event[EventStateChangedData] event)
 
None _async_update_humidity (self, str humidity)
 
bool _is_device_active (self)
 

Private Attributes

 _active
 
 _attr_action
 
 _attr_device_info
 
 _attr_unique_id
 
 _away_fixed
 
 _away_humidity
 
 _cur_humidity
 
 _device_class
 
 _dry_tolerance
 
 _humidity_lock
 
 _is_away
 
 _keep_alive
 
 _max_humidity
 
 _min_cycle_duration
 
 _min_humidity
 
 _name
 
 _remove_stale_tracking
 
 _saved_target_humidity
 
 _sensor_entity_id
 
 _sensor_stale_duration
 
 _state
 
 _switch_entity_id
 
 _target_humidity
 
 _wet_tolerance
 

Static Private Attributes

bool _attr_should_poll = False
 

Additional Inherited Members

- Public Attributes inherited from homeassistant.helpers.entity.Entity
 device_entry
 
 entity_id
 
 hass
 
 parallel_updates
 
 platform
 
 registry_entry
 
- Static Public Attributes inherited from homeassistant.components.humidifier.HumidifierEntity
 float
 
 HumidifierEntityFeature
 
 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
 

Detailed Description

Representation of a Generic Hygrostat device.

Definition at line 166 of file humidifier.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat.__init__ (   self,
HomeAssistant  hass,
str  name,
str  switch_entity_id,
str  sensor_entity_id,
float | None  min_humidity,
float | None  max_humidity,
float | None  target_humidity,
HumidifierDeviceClass | None  device_class,
timedelta | None  min_cycle_duration,
float  dry_tolerance,
float  wet_tolerance,
timedelta | None  keep_alive,
bool | None  initial_state,
int | None  away_humidity,
bool | None  away_fixed,
timedelta | None  sensor_stale_duration,
str | None  unique_id 
)
Initialize the hygrostat.

Definition at line 171 of file humidifier.py.

Member Function Documentation

◆ _async_device_turn_off()

None homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat._async_device_turn_off (   self)
private
Turn humidifier toggleable device off.

Definition at line 557 of file humidifier.py.

◆ _async_device_turn_on()

None homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat._async_device_turn_on (   self)
private
Turn humidifier toggleable device on.

Definition at line 552 of file humidifier.py.

◆ _async_operate()

None homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat._async_operate (   self,
datetime | None   time = None,
bool   force = False 
)
private
Check if we need to turn humidifying on or off.

Definition at line 472 of file humidifier.py.

◆ _async_sensor_event()

None homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat._async_sensor_event (   self,
Event[EventStateChangedData] | Event[EventStateReportedData]   event 
)
private
Handle ambient humidity changes.

Definition at line 399 of file humidifier.py.

◆ _async_sensor_not_responding()

None homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat._async_sensor_not_responding (   self,
datetime | None   now = None 
)
private
Handle sensor stale event.

Definition at line 426 of file humidifier.py.

◆ _async_sensor_update()

None homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat._async_sensor_update (   self,
State  new_state 
)
private
Update state based on humidity sensor.

Definition at line 409 of file humidifier.py.

◆ _async_switch_changed()

None homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat._async_switch_changed (   self,
State | None  new_state 
)
private
Handle humidifier switch state changes.

Definition at line 443 of file humidifier.py.

◆ _async_switch_event()

None homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat._async_switch_event (   self,
Event[EventStateChangedData event 
)
private
Handle humidifier switch state changes.

Definition at line 438 of file humidifier.py.

◆ _async_update_humidity()

None homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat._async_update_humidity (   self,
str  humidity 
)
private
Update hygrostat with latest state from sensor.

Definition at line 458 of file humidifier.py.

◆ _is_device_active()

bool homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat._is_device_active (   self)
private
If the toggleable device is currently active.

Definition at line 548 of file humidifier.py.

◆ async_added_to_hass()

None homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat.async_added_to_hass (   self)
Run when entity about to be added.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 222 of file humidifier.py.

◆ async_set_humidity()

None homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat.async_set_humidity (   self,
int  humidity 
)
Set new target humidity.

Reimplemented from homeassistant.components.humidifier.HumidifierEntity.

Definition at line 367 of file humidifier.py.

◆ async_set_mode()

None homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat.async_set_mode (   self,
str  mode 
)
Set new mode.

This method must be run in the event loop and returns a coroutine.

Reimplemented from homeassistant.components.humidifier.HumidifierEntity.

Definition at line 564 of file humidifier.py.

◆ async_turn_off()

None homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat.async_turn_off (   self,
**Any  kwargs 
)
Turn hygrostat off.

Reimplemented from homeassistant.helpers.entity.ToggleEntity.

Definition at line 358 of file humidifier.py.

◆ async_turn_on()

None homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat.async_turn_on (   self,
**Any  kwargs 
)
Turn hygrostat on.

Reimplemented from homeassistant.helpers.entity.ToggleEntity.

Definition at line 350 of file humidifier.py.

◆ async_will_remove_from_hass()

None homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat.async_will_remove_from_hass (   self)
Run when entity will be removed from hass.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 291 of file humidifier.py.

◆ available()

bool homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat.available (   self)
Return True if entity is available.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 298 of file humidifier.py.

◆ available_modes()

list[str] | None homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat.available_modes (   self)
Return a list of available modes.

Reimplemented from homeassistant.components.humidifier.HumidifierEntity.

Definition at line 339 of file humidifier.py.

◆ current_humidity()

float | None homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat.current_humidity (   self)
Return the measured humidity.

Reimplemented from homeassistant.components.humidifier.HumidifierEntity.

Definition at line 320 of file humidifier.py.

◆ device_class()

HumidifierDeviceClass homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat.device_class (   self)
Return the device class of the humidifier.

Reimplemented from homeassistant.components.humidifier.HumidifierEntity.

Definition at line 346 of file humidifier.py.

◆ extra_state_attributes()

dict[str, Any] | None homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat.extra_state_attributes (   self)
Return the optional state attributes.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 303 of file humidifier.py.

◆ is_on()

bool | None homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat.is_on (   self)
Return true if the hygrostat is on.

Reimplemented from homeassistant.helpers.entity.ToggleEntity.

Definition at line 315 of file humidifier.py.

◆ max_humidity()

float homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat.max_humidity (   self)
Return the maximum humidity.

Reimplemented from homeassistant.components.humidifier.HumidifierEntity.

Definition at line 391 of file humidifier.py.

◆ min_humidity()

float homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat.min_humidity (   self)
Return the minimum humidity.

Reimplemented from homeassistant.components.humidifier.HumidifierEntity.

Definition at line 382 of file humidifier.py.

◆ mode()

str | None homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat.mode (   self)
Return the current mode.

Reimplemented from homeassistant.components.humidifier.HumidifierEntity.

Definition at line 330 of file humidifier.py.

◆ name()

str homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat.name (   self)
Return the name of the hygrostat.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 310 of file humidifier.py.

◆ target_humidity()

float | None homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat.target_humidity (   self)
Return the humidity we try to reach.

Reimplemented from homeassistant.components.humidifier.HumidifierEntity.

Definition at line 325 of file humidifier.py.

Member Data Documentation

◆ _active

homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat._active
private

Definition at line 206 of file humidifier.py.

◆ _attr_action

homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat._attr_action
private

Definition at line 219 of file humidifier.py.

◆ _attr_device_info

homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat._attr_device_info
private

Definition at line 195 of file humidifier.py.

◆ _attr_should_poll

bool homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat._attr_should_poll = False
staticprivate

Definition at line 169 of file humidifier.py.

◆ _attr_unique_id

homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat._attr_unique_id
private

Definition at line 220 of file humidifier.py.

◆ _away_fixed

homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat._away_fixed
private

Definition at line 215 of file humidifier.py.

◆ _away_humidity

homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat._away_humidity
private

Definition at line 214 of file humidifier.py.

◆ _cur_humidity

homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat._cur_humidity
private

Definition at line 461 of file humidifier.py.

◆ _device_class

homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat._device_class
private

Definition at line 199 of file humidifier.py.

◆ _dry_tolerance

homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat._dry_tolerance
private

Definition at line 201 of file humidifier.py.

◆ _humidity_lock

homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat._humidity_lock
private

Definition at line 208 of file humidifier.py.

◆ _is_away

homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat._is_away
private

Definition at line 218 of file humidifier.py.

◆ _keep_alive

homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat._keep_alive
private

Definition at line 203 of file humidifier.py.

◆ _max_humidity

homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat._max_humidity
private

Definition at line 210 of file humidifier.py.

◆ _min_cycle_duration

homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat._min_cycle_duration
private

Definition at line 200 of file humidifier.py.

◆ _min_humidity

homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat._min_humidity
private

Definition at line 209 of file humidifier.py.

◆ _name

homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat._name
private

Definition at line 192 of file humidifier.py.

◆ _remove_stale_tracking

homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat._remove_stale_tracking
private

Definition at line 416 of file humidifier.py.

◆ _saved_target_humidity

homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat._saved_target_humidity
private

Definition at line 205 of file humidifier.py.

◆ _sensor_entity_id

homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat._sensor_entity_id
private

Definition at line 194 of file humidifier.py.

◆ _sensor_stale_duration

homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat._sensor_stale_duration
private

Definition at line 216 of file humidifier.py.

◆ _state

homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat._state
private

Definition at line 204 of file humidifier.py.

◆ _switch_entity_id

homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat._switch_entity_id
private

Definition at line 193 of file humidifier.py.

◆ _target_humidity

homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat._target_humidity
private

Definition at line 211 of file humidifier.py.

◆ _wet_tolerance

homeassistant.components.generic_hygrostat.humidifier.GenericHygrostat._wet_tolerance
private

Definition at line 202 of file humidifier.py.


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