Merge of nested IF-IF cases - S-W (#48372)
This commit is contained in:
parent
3aed84560f
commit
8d5ce53098
15 changed files with 128 additions and 126 deletions
|
@ -19,9 +19,11 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
|||
|
||||
for sensor in pywink.get_sensors():
|
||||
_id = sensor.object_id() + sensor.name()
|
||||
if _id not in hass.data[DOMAIN]["unique_ids"]:
|
||||
if sensor.capability() in SENSOR_TYPES:
|
||||
add_entities([WinkSensorEntity(sensor, hass)])
|
||||
if (
|
||||
_id not in hass.data[DOMAIN]["unique_ids"]
|
||||
and sensor.capability() in SENSOR_TYPES
|
||||
):
|
||||
add_entities([WinkSensorEntity(sensor, hass)])
|
||||
|
||||
for eggtray in pywink.get_eggtrays():
|
||||
_id = eggtray.object_id() + eggtray.name()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue