mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Improve docstring of EntityComponent and EntityPlatform (#128135)
This commit is contained in:
parent
c7882450ac
commit
416ead5311
@ -65,10 +65,13 @@ async def async_update_entity(hass: HomeAssistant, entity_id: str) -> None:
|
||||
|
||||
|
||||
class EntityComponent(Generic[_EntityT]):
|
||||
"""The EntityComponent manages platforms that manages entities.
|
||||
"""The EntityComponent manages platforms that manage entities.
|
||||
|
||||
An example of an entity component is 'light', which manages platforms such
|
||||
as 'hue.light'.
|
||||
|
||||
This class has the following responsibilities:
|
||||
- Process the configuration and set up a platform based component.
|
||||
- Process the configuration and set up a platform based component, for example light.
|
||||
- Manage the platforms and their entities.
|
||||
- Help extract the entities from a service call.
|
||||
- Listen for discovery events for platforms related to the domain.
|
||||
|
@ -111,7 +111,11 @@ class EntityPlatformModule(Protocol):
|
||||
|
||||
|
||||
class EntityPlatform:
|
||||
"""Manage the entities for a single platform."""
|
||||
"""Manage the entities for a single platform.
|
||||
|
||||
An example of an entity platform is 'hue.light', which is managed by
|
||||
the entity component 'light'.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
|
Loading…
x
Reference in New Issue
Block a user