parent
3c07a9b4c7
commit
a28e644def
1 changed files with 1 additions and 1 deletions
|
@ -143,7 +143,6 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
|
|||
hass_sensors.append(SMAsensor(sensor_def[name], sub_sensors))
|
||||
used_sensors.append(name)
|
||||
used_sensors.extend(attr)
|
||||
used_sensors = [sensor_def[s] for s in set(used_sensors)]
|
||||
|
||||
if isinstance(config_sensors, list):
|
||||
if not config_sensors: # Use all sensors by default
|
||||
|
@ -152,6 +151,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
|
|||
for sensor in used_sensors:
|
||||
hass_sensors.append(SMAsensor(sensor_def[sensor], []))
|
||||
|
||||
used_sensors = [sensor_def[s] for s in set(used_sensors)]
|
||||
async_add_entities(hass_sensors)
|
||||
|
||||
# Init the SMA interface
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue