Skip to content

Commit c894187

Browse files
committed
Though shall not add twice
1 parent e922c85 commit c894187

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

custom_components/plugwise-beta/sensor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
155155
if 'off' in sensor and api._power_tariff['electricity_consumption_tariff_structure'] == 'single':
156156
continue
157157
devices.append(PwPowerSensor(api, updater, '{}_{}'.format(device['name'], sensor), dev_id, sensor, sensor_type))
158-
159-
devices.append(PwThermostatSensor(api, updater, '{}_{}'.format(device['name'], sensor), dev_id, sensor, sensor_type))
158+
else:
159+
devices.append(PwThermostatSensor(api, updater, '{}_{}'.format(device['name'], sensor), dev_id, sensor, sensor_type))
160160
_LOGGER.info('Added sensor.%s', '{}_{}'.format(device['name'], sensor))
161161

162162
async_add_entities(devices, True)

0 commit comments

Comments
 (0)