mirror of
https://github.com/home-assistant/core.git
synced 2025-07-10 14:57:09 +00:00
parent
3c07a9b4c7
commit
a28e644def
@ -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))
|
hass_sensors.append(SMAsensor(sensor_def[name], sub_sensors))
|
||||||
used_sensors.append(name)
|
used_sensors.append(name)
|
||||||
used_sensors.extend(attr)
|
used_sensors.extend(attr)
|
||||||
used_sensors = [sensor_def[s] for s in set(used_sensors)]
|
|
||||||
|
|
||||||
if isinstance(config_sensors, list):
|
if isinstance(config_sensors, list):
|
||||||
if not config_sensors: # Use all sensors by default
|
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:
|
for sensor in used_sensors:
|
||||||
hass_sensors.append(SMAsensor(sensor_def[sensor], []))
|
hass_sensors.append(SMAsensor(sensor_def[sensor], []))
|
||||||
|
|
||||||
|
used_sensors = [sensor_def[s] for s in set(used_sensors)]
|
||||||
async_add_entities(hass_sensors)
|
async_add_entities(hass_sensors)
|
||||||
|
|
||||||
# Init the SMA interface
|
# Init the SMA interface
|
||||||
|
Loading…
x
Reference in New Issue
Block a user