Update comments

This commit is contained in:
Paulus Schoutsen 2023-03-14 23:19:20 -04:00
parent 7dfb3f9af1
commit ec12436d10

View file

@ -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: