Skip to content

Commit

Permalink
Fix include entities
Browse files Browse the repository at this point in the history
  • Loading branch information
bramstroker committed Jul 28, 2022
1 parent 0f3c162 commit 2fbfc68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/powercalc/sensor.py
Expand Up @@ -411,7 +411,6 @@ async def create_sensors(
existing_sensors = []
if CONF_ENTITIES in config:
for entity_config in config[CONF_ENTITIES]:
context = CreationContext(group=context.group, entity_config=entity_config)
# When there are nested entities, combine these with the current entities, recursively
if CONF_ENTITIES in entity_config or CONF_CREATE_GROUP in entity_config:
try:
Expand Down Expand Up @@ -441,6 +440,7 @@ async def create_sensors(

# Create sensors for each entity
for sensor_config in sensor_configs.values():
context = CreationContext(group=context.group, entity_config=sensor_config)
merged_sensor_config = get_merged_sensor_configuration(
global_config, config, sensor_config
)
Expand Down

0 comments on commit 2fbfc68

Please sign in to comment.