Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include all enphase_envoy devices in async_remove_config_entry_device #124533

Merged
merged 2 commits into from
Sep 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions homeassistant/components/enphase_envoy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,16 @@
envoy_serial_num = config_entry.unique_id
if envoy_serial_num in dev_ids:
return False
if envoy_data and envoy_data.inverters:
for inverter in envoy_data.inverters:
if str(inverter) in dev_ids:
if envoy_data:
if envoy_data.inverters:
for inverter in envoy_data.inverters:
if str(inverter) in dev_ids:
return False
if envoy_data.encharge_inventory:
for encharge in envoy_data.encharge_inventory:
if str(encharge) in dev_ids:
return False
if envoy_data.enpower:
if str(envoy_data.enpower.serial_number) in dev_ids:

Check warning on line 73 in homeassistant/components/enphase_envoy/__init__.py

View check run for this annotation

Codecov / codecov/patch

homeassistant/components/enphase_envoy/__init__.py#L63-L73

Added lines #L63 - L73 were not covered by tests
return False
return True