Skip to content

Commit

Permalink
Fixed setup entry for Eco Navi
Browse files Browse the repository at this point in the history
  • Loading branch information
sockless-coding committed Jun 28, 2024
1 parent b8588bc commit 7939070
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion custom_components/panasonic_cc/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"domain": "panasonic_cc",
"name": "Panasonic Comfort Cloud",
"after_dependencies": ["http"],
"version": "1.0.50",
"version": "1.0.51",
"config_flow": true,
"documentation": "https://github.com/sockless-coding/panasonic_cc/",
"dependencies": [],
Expand Down
5 changes: 4 additions & 1 deletion custom_components/panasonic_cc/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=

async def async_setup_entry(hass, entry, async_add_entities):
devices = []
for device in hass.data[PANASONIC_DEVICES]:
device_list: list[PanasonicApiDevice] = hass.data[PANASONIC_DEVICES]
for device in device_list:
devices.append(PanasonicNanoeSwitch(device))
if device.support_eco_navi:
devices.append(PanasonicEcoNaviSwitch(device))
async_add_entities(devices)

class PanasonicNanoeSwitch(ToggleEntity):
Expand Down

0 comments on commit 7939070

Please sign in to comment.