skip non existing zones (#23113)

pull/23132/head
Fredrik Erlandsson 2019-04-16 01:41:33 +02:00 committed by Paulus Schoutsen
parent 9e15fc1376
commit 4d080f8b17
1 changed files with 2 additions and 1 deletions

View File

@ -27,7 +27,8 @@ async def async_setup_entry(hass, entry, async_add_entities):
if zones:
async_add_entities([
DaikinZoneSwitch(daikin_api, zone_id)
for zone_id in range(len(zones))
for zone_id, name in enumerate(zones)
if name != '-'
])