Home Assistant Unofficial Reference 2024.12.1
models.py
Go to the documentation of this file.
1 """Models for permissions."""
2 
3 from __future__ import annotations
4 
5 from typing import TYPE_CHECKING
6 
7 import attr
8 
9 if TYPE_CHECKING:
10  from homeassistant.helpers import device_registry as dr, entity_registry as er
11 
12 
13 @attr.s(slots=True)
15  """Class to hold data for permission lookups."""
16 
17  entity_registry: er.EntityRegistry = attr.ib()
18  device_registry: dr.DeviceRegistry = attr.ib()