Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.search.Searcher Class Reference

Public Member Functions

None __init__ (self, HomeAssistant hass, dict[str, EntityInfo] entity_sources)
 
dict[str, set[str]] async_search (self, ItemType item_type, str item_id)
 

Public Attributes

 hass
 

Static Public Attributes

dictionary EXIST_AS_ENTITY = {"automation", "group", "person", "scene", "script"}
 

Private Member Functions

None _add (self, ItemType item_type, str|Iterable[str]|None item_id)
 
ar.AreaEntry|None _async_resolve_up_area (self, str area_id)
 
dr.DeviceEntry|None _async_resolve_up_device (self, str device_id)
 
er.RegistryEntry|None _async_resolve_up_entity (self, str entity_id)
 
None _async_search_area (self, str area_id, *bool entry_point=True)
 
None _async_search_automation (self, str automation_entity_id)
 
None _async_search_automation_blueprint (self, str blueprint_path)
 
None _async_search_config_entry (self, str config_entry_id)
 
None _async_search_device (self, str device_id, *bool entry_point=True)
 
None _async_search_entity (self, str entity_id, *bool entry_point=True)
 
None _async_search_floor (self, str floor_id)
 
None _async_search_group (self, str group_entity_id)
 
None _async_search_label (self, str label_id)
 
None _async_search_person (self, str person_entity_id)
 
None _async_search_scene (self, str scene_entity_id)
 
None _async_search_script (self, str script_entity_id, *bool entry_point=True)
 
None _async_search_script_blueprint (self, str blueprint_path)
 

Private Attributes

 _area_registry
 
 _device_registry
 
 _entity_registry
 
 _entity_sources
 

Detailed Description

Find related things.

Definition at line 80 of file __init__.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.search.Searcher.__init__ (   self,
HomeAssistant  hass,
dict[str, EntityInfo entity_sources 
)
Search results.

Definition at line 85 of file __init__.py.

Member Function Documentation

◆ _add()

None homeassistant.components.search.Searcher._add (   self,
ItemType  item_type,
str | Iterable[str] | None  item_id 
)
private
Add an item (or items) to the results.

Definition at line 112 of file __init__.py.

◆ _async_resolve_up_area()

ar.AreaEntry | None homeassistant.components.search.Searcher._async_resolve_up_area (   self,
str  area_id 
)
private
Resolve up from an area.

Above an area can be a floor.

Definition at line 597 of file __init__.py.

◆ _async_resolve_up_device()

dr.DeviceEntry | None homeassistant.components.search.Searcher._async_resolve_up_device (   self,
str  device_id 
)
private
Resolve up from a device.

Above a device is an area or floor.
Above a device is also the config entry.

Definition at line 537 of file __init__.py.

◆ _async_resolve_up_entity()

er.RegistryEntry | None homeassistant.components.search.Searcher._async_resolve_up_entity (   self,
str  entity_id 
)
private
Resolve up from an entity.

Above an entity is a device, area or floor.
Above an entity is also the config entry.

Definition at line 556 of file __init__.py.

◆ _async_search_area()

None homeassistant.components.search.Searcher._async_search_area (   self,
str  area_id,
*bool   entry_point = True 
)
private
Find results for an area.

Definition at line 123 of file __init__.py.

◆ _async_search_automation()

None homeassistant.components.search.Searcher._async_search_automation (   self,
str  automation_entity_id 
)
private
Find results for an automation.

Definition at line 211 of file __init__.py.

◆ _async_search_automation_blueprint()

None homeassistant.components.search.Searcher._async_search_automation_blueprint (   self,
str  blueprint_path 
)
private
Find results for an automation blueprint.

Definition at line 272 of file __init__.py.

◆ _async_search_config_entry()

None homeassistant.components.search.Searcher._async_search_config_entry (   self,
str  config_entry_id 
)
private
Find results for a config entry.

Definition at line 280 of file __init__.py.

◆ _async_search_device()

None homeassistant.components.search.Searcher._async_search_device (   self,
str  device_id,
*bool   entry_point = True 
)
private
Find results for a device.

Definition at line 295 of file __init__.py.

◆ _async_search_entity()

None homeassistant.components.search.Searcher._async_search_entity (   self,
str  entity_id,
*bool   entry_point = True 
)
private
Find results for an entity.

Definition at line 322 of file __init__.py.

◆ _async_search_floor()

None homeassistant.components.search.Searcher._async_search_floor (   self,
str  floor_id 
)
private
Find results for a floor.

Definition at line 350 of file __init__.py.

◆ _async_search_group()

None homeassistant.components.search.Searcher._async_search_group (   self,
str  group_entity_id 
)
private
Find results for a group.

Note: We currently only support the classic groups, thus
we don't look up the area/floor for a group entity.

Definition at line 366 of file __init__.py.

◆ _async_search_label()

None homeassistant.components.search.Searcher._async_search_label (   self,
str  label_id 
)
private
Find results for a label.

Definition at line 392 of file __init__.py.

◆ _async_search_person()

None homeassistant.components.search.Searcher._async_search_person (   self,
str  person_entity_id 
)
private
Find results for a person.

Definition at line 422 of file __init__.py.

◆ _async_search_scene()

None homeassistant.components.search.Searcher._async_search_scene (   self,
str  scene_entity_id 
)
private
Find results for a scene.

Definition at line 446 of file __init__.py.

◆ _async_search_script()

None homeassistant.components.search.Searcher._async_search_script (   self,
str  script_entity_id,
*bool   entry_point = True 
)
private
Find results for a script.

Definition at line 470 of file __init__.py.

◆ _async_search_script_blueprint()

None homeassistant.components.search.Searcher._async_search_script_blueprint (   self,
str  blueprint_path 
)
private
Find results for a script blueprint.

Definition at line 530 of file __init__.py.

◆ async_search()

dict[str, set[str]] homeassistant.components.search.Searcher.async_search (   self,
ItemType  item_type,
str  item_id 
)
Find results.

Definition at line 99 of file __init__.py.

Member Data Documentation

◆ _area_registry

homeassistant.components.search.Searcher._area_registry
private

Definition at line 92 of file __init__.py.

◆ _device_registry

homeassistant.components.search.Searcher._device_registry
private

Definition at line 93 of file __init__.py.

◆ _entity_registry

homeassistant.components.search.Searcher._entity_registry
private

Definition at line 94 of file __init__.py.

◆ _entity_sources

homeassistant.components.search.Searcher._entity_sources
private

Definition at line 95 of file __init__.py.

◆ EXIST_AS_ENTITY

dictionary homeassistant.components.search.Searcher.EXIST_AS_ENTITY = {"automation", "group", "person", "scene", "script"}
static

Definition at line 83 of file __init__.py.

◆ hass

homeassistant.components.search.Searcher.hass

Definition at line 91 of file __init__.py.


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