Skip to content

Commit

Permalink
Fix all tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bramstroker committed Jul 7, 2023
1 parent d04f897 commit 5eaefda
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
1 change: 0 additions & 1 deletion custom_components/powercalc/__init__.py
Expand Up @@ -235,7 +235,6 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:

domain_groups: list[str] | None = domain_config.get(CONF_CREATE_DOMAIN_GROUPS)
if domain_groups:

async def _create_domain_groups(event: None) -> None:
await create_domain_groups(
hass,
Expand Down
18 changes: 0 additions & 18 deletions custom_components/powercalc/discovery.py
Expand Up @@ -231,24 +231,6 @@ def _init_entity_discovery(
data=discovery_data,
)

# Code below if for legacy discovery routine, will be removed somewhere in the future
# if power_profile and not power_profile.is_additional_configuration_required:
# discovery_info = {
# CONF_ENTITY_ID: source_entity.entity_id,
# DISCOVERY_SOURCE_ENTITY: source_entity,
# DISCOVERY_POWER_PROFILE: power_profile,
# DISCOVERY_TYPE: PowercalcDiscoveryType.LIBRARY,
# }
# self.hass.async_create_task(
# discovery.async_load_platform(
# self.hass,
# SENSOR_DOMAIN,
# DOMAIN,
# discovery_info,
# self.ha_config,
# ),
# )

def _is_user_configured(self, entity_id: str) -> bool:
"""Check if user have setup powercalc sensors for a given entity_id.
Either with the YAML or GUI method.
Expand Down

0 comments on commit 5eaefda

Please sign in to comment.