diff --git a/custom_components/average/__init__.py b/custom_components/average/__init__.py index 966dba5..541089f 100644 --- a/custom_components/average/__init__.py +++ b/custom_components/average/__init__.py @@ -2,8 +2,7 @@ # Creative Commons BY-NC-SA 4.0 International Public License # (see LICENSE.md or https://creativecommons.org/licenses/by-nc-sa/4.0/) -""" -The Average Sensor. +"""The Average Sensor. For more details about this sensor, please refer to the documentation at https://github.com/Limych/ha-average/ @@ -13,9 +12,9 @@ import logging import voluptuous as vol + from homeassistant.const import SERVICE_RELOAD from homeassistant.core import HomeAssistant, ServiceCall -from homeassistant.helpers.entity_component import EntityComponent from homeassistant.helpers.reload import async_reload_integration_platforms from homeassistant.helpers.typing import ConfigType @@ -29,16 +28,8 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: # Print startup message _LOGGER.info(STARTUP_MESSAGE) - # await async_setup_reload_service(hass, DOMAIN, PLATFORMS) - - component = EntityComponent(_LOGGER, DOMAIN, hass) - async def reload_service_handler(service: ServiceCall) -> None: """Reload all average sensors from config.""" - print("+++++++++++++++++++++++++") - print(component) - # print(hass.data[DATA_INSTANCES]["sensor"].entities[0]) - await async_reload_integration_platforms(hass, DOMAIN, PLATFORMS) hass.services.async_register(