mirror of
https://github.com/home-assistant/core.git
synced 2025-08-30 01:42:21 +02:00
Improve comment on disabled_by + hidden_by flag in registries (#151290)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com> Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
@@ -836,7 +836,7 @@ class DeviceRegistry(BaseRegistry[dict[str, list[dict[str, Any]]]]):
|
|||||||
default_manufacturer: str | None | UndefinedType = UNDEFINED,
|
default_manufacturer: str | None | UndefinedType = UNDEFINED,
|
||||||
default_model: str | None | UndefinedType = UNDEFINED,
|
default_model: str | None | UndefinedType = UNDEFINED,
|
||||||
default_name: str | None | UndefinedType = UNDEFINED,
|
default_name: str | None | UndefinedType = UNDEFINED,
|
||||||
# To disable a device if it gets created
|
# To disable a device if it gets created, does not affect existing devices
|
||||||
disabled_by: DeviceEntryDisabler | None | UndefinedType = UNDEFINED,
|
disabled_by: DeviceEntryDisabler | None | UndefinedType = UNDEFINED,
|
||||||
entry_type: DeviceEntryType | None | UndefinedType = UNDEFINED,
|
entry_type: DeviceEntryType | None | UndefinedType = UNDEFINED,
|
||||||
hw_version: str | None | UndefinedType = UNDEFINED,
|
hw_version: str | None | UndefinedType = UNDEFINED,
|
||||||
|
@@ -908,7 +908,8 @@ class EntityRegistry(BaseRegistry):
|
|||||||
# To influence entity ID generation
|
# To influence entity ID generation
|
||||||
calculated_object_id: str | None = None,
|
calculated_object_id: str | None = None,
|
||||||
suggested_object_id: str | None = None,
|
suggested_object_id: str | None = None,
|
||||||
# To disable or hide an entity if it gets created
|
# To disable or hide an entity if it gets created, does not affect
|
||||||
|
# existing entities
|
||||||
disabled_by: RegistryEntryDisabler | None = None,
|
disabled_by: RegistryEntryDisabler | None = None,
|
||||||
hidden_by: RegistryEntryHider | None = None,
|
hidden_by: RegistryEntryHider | None = None,
|
||||||
# Function to generate initial entity options if it gets created
|
# Function to generate initial entity options if it gets created
|
||||||
|
Reference in New Issue
Block a user