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:
Erik Montnemery
2025-08-29 17:27:39 +02:00
committed by GitHub
parent 5e003627b2
commit d72b35a0cd
2 changed files with 3 additions and 2 deletions

View File

@@ -836,7 +836,7 @@ class DeviceRegistry(BaseRegistry[dict[str, list[dict[str, Any]]]]):
default_manufacturer: str | None | UndefinedType = UNDEFINED,
default_model: 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,
entry_type: DeviceEntryType | None | UndefinedType = UNDEFINED,
hw_version: str | None | UndefinedType = UNDEFINED,

View File

@@ -908,7 +908,8 @@ class EntityRegistry(BaseRegistry):
# To influence entity ID generation
calculated_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,
hidden_by: RegistryEntryHider | None = None,
# Function to generate initial entity options if it gets created