From ec12436d1058549b50ba90c449e662d3b9218dff Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Tue, 14 Mar 2023 23:19:20 -0400 Subject: [PATCH] Update comments --- homeassistant/helpers/engine_component.py | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/homeassistant/helpers/engine_component.py b/homeassistant/helpers/engine_component.py index 2258eb91b4d..d699804359d 100644 --- a/homeassistant/helpers/engine_component.py +++ b/homeassistant/helpers/engine_component.py @@ -1,4 +1,4 @@ -"""Service platform helper.""" +"""Engine component helper.""" from __future__ import annotations import logging @@ -15,22 +15,22 @@ class Engine: """Base class for Home Assistant engines.""" async def async_internal_added_to_hass(self) -> None: - """Run when service about to be added to hass. + """Run when engine about to be added to Home Assistant. Not to be extended by integrations. """ async def async_added_to_hass(self) -> None: - """Run when service about to be added to hass.""" + """Run when engine about to be added to Home Assistant.""" async def async_internal_will_remove_from_hass(self) -> None: - """Prepare to remove the service from Home Assistant. + """Prepare to remove the engine from Home Assistant. Not to be extended by integrations. """ async def async_will_remove_from_hass(self) -> None: - """Prepare to remove the service from Home Assistant.""" + """Prepare to remove the engine from Home Assistant.""" _EngineT_co = TypeVar("_EngineT_co", bound=Engine, covariant=True) @@ -76,14 +76,8 @@ class EngineComponent(Generic[_EngineT_co]): async def async_setup_entry(self, config_entry: ConfigEntry) -> bool: """Set up a config entry.""" - platform_type = config_entry.domain platform = await async_prepare_setup_platform( - self.hass, - # In future PR we should make hass_config part of the constructor - # params. - self.config or {}, - self.domain, - platform_type, + self.hass, self.config, self.domain, config_entry.domain ) if platform is None: