Skip to content

Commit

Permalink
Make compatiple with routers without ipv4_status
Browse files Browse the repository at this point in the history
  • Loading branch information
karlsvenssonn committed Jan 10, 2025
1 parent e0b1c07 commit 04e3e5f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion custom_components/tplink_router/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
def callback():
firm = client.get_firmware()
stat = client.get_status()
ipv4_stat = client.get_ipv4_status()
if hasattr(client, "get_ipv4_status"):
ipv4_stat = client.get_ipv4_status()
else:
ipv4_stat = None

return firm, stat, ipv4_stat

Expand Down

0 comments on commit 04e3e5f

Please sign in to comment.