Home Assistant Unofficial Reference 2024.12.1
homeassistant.helpers.floor_registry.FloorRegistry Class Reference
Inheritance diagram for homeassistant.helpers.floor_registry.FloorRegistry:
[legend]
Collaboration diagram for homeassistant.helpers.floor_registry.FloorRegistry:
[legend]

Public Member Functions

None __init__ (self, HomeAssistant hass)
 
FloorEntry async_create (self, str name, *set[str]|None aliases=None, str|None icon=None, int|None level=None)
 
None async_delete (self, str floor_id)
 
FloorEntry|None async_get_floor (self, str floor_id)
 
FloorEntry|None async_get_floor_by_name (self, str name)
 
Iterable[FloorEntryasync_list_floors (self)
 
None async_load (self)
 
FloorEntry async_update (self, str floor_id, *set[str]|UndefinedType aliases=UNDEFINED, str|None|UndefinedType icon=UNDEFINED, int|UndefinedType level=UNDEFINED, str|UndefinedType name=UNDEFINED)
 

Public Attributes

 floors
 
 hass
 

Private Member Functions

FloorRegistryStoreData _data_to_save (self)
 
str _generate_id (self, str name)
 

Private Attributes

 _floor_data
 
 _store
 

Detailed Description

Class to hold a registry of floors.

Definition at line 95 of file floor_registry.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.helpers.floor_registry.FloorRegistry.__init__ (   self,
HomeAssistant  hass 
)
Initialize the floor registry.

Definition at line 101 of file floor_registry.py.

Member Function Documentation

◆ _data_to_save()

FloorRegistryStoreData homeassistant.helpers.floor_registry.FloorRegistry._data_to_save (   self)
private
Return data of floor registry to store in a file.

Definition at line 247 of file floor_registry.py.

◆ _generate_id()

str homeassistant.helpers.floor_registry.FloorRegistry._generate_id (   self,
str  name 
)
private
Generate floor ID.

Definition at line 131 of file floor_registry.py.

◆ async_create()

FloorEntry homeassistant.helpers.floor_registry.FloorRegistry.async_create (   self,
str  name,
*set[str] | None   aliases = None,
str | None   icon = None,
int | None   level = None 
)
Create a new floor.

Definition at line 136 of file floor_registry.py.

◆ async_delete()

None homeassistant.helpers.floor_registry.FloorRegistry.async_delete (   self,
str  floor_id 
)
Delete floor.

Definition at line 170 of file floor_registry.py.

◆ async_get_floor()

FloorEntry | None homeassistant.helpers.floor_registry.FloorRegistry.async_get_floor (   self,
str  floor_id 
)
Get floor by id.

We retrieve the FloorEntry from the underlying dict to avoid
the overhead of the UserDict __getitem__.

Definition at line 113 of file floor_registry.py.

◆ async_get_floor_by_name()

FloorEntry | None homeassistant.helpers.floor_registry.FloorRegistry.async_get_floor_by_name (   self,
str  name 
)
Get floor by name.

Definition at line 122 of file floor_registry.py.

◆ async_list_floors()

Iterable[FloorEntry] homeassistant.helpers.floor_registry.FloorRegistry.async_list_floors (   self)
Get all floors.

Definition at line 127 of file floor_registry.py.

◆ async_load()

None homeassistant.helpers.floor_registry.FloorRegistry.async_load (   self)
Load the floor registry.

Definition at line 226 of file floor_registry.py.

◆ async_update()

FloorEntry homeassistant.helpers.floor_registry.FloorRegistry.async_update (   self,
str  floor_id,
*set[str] | UndefinedType   aliases = UNDEFINED,
str | None | UndefinedType   icon = UNDEFINED,
int | UndefinedType   level = UNDEFINED,
str | UndefinedType   name = UNDEFINED 
)
Update name of the floor.

Definition at line 184 of file floor_registry.py.

Member Data Documentation

◆ _floor_data

homeassistant.helpers.floor_registry.FloorRegistry._floor_data
private

Definition at line 244 of file floor_registry.py.

◆ _store

homeassistant.helpers.floor_registry.FloorRegistry._store
private

Definition at line 104 of file floor_registry.py.

◆ floors

homeassistant.helpers.floor_registry.FloorRegistry.floors

Definition at line 243 of file floor_registry.py.

◆ hass

homeassistant.helpers.floor_registry.FloorRegistry.hass

Definition at line 103 of file floor_registry.py.


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