Skip to content

Commit

Permalink
Fix mypy typing
Browse files Browse the repository at this point in the history
  • Loading branch information
bramstroker committed Jul 16, 2023
1 parent f126d65 commit f7cc57d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/powercalc/group_include/include.py
Expand Up @@ -61,10 +61,10 @@ def resolve_include_entities(hass: HomeAssistant, include_config: dict) -> list[
def find_powercalc_entities_by_source_entity(hass: HomeAssistant, source_entity_id: str) -> list[Entity]:
# Check if we have powercalc sensors setup with YAML
if source_entity_id in hass.data[DOMAIN][DATA_CONFIGURED_ENTITIES]:
return hass.data[DOMAIN][DATA_CONFIGURED_ENTITIES][source_entity_id]
return hass.data[DOMAIN][DATA_CONFIGURED_ENTITIES][source_entity_id] # type: ignore

# Check if we have powercalc sensors setup with GUI
entities = []
entities: list[Entity] = []
for entry in hass.config_entries.async_entries(DOMAIN):
if entry.data.get(CONF_ENTITY_ID) != source_entity_id:
continue
Expand Down

0 comments on commit f7cc57d

Please sign in to comment.