From cb788699c0f0b8d3b4c0991f658a935fd11bb8a8 Mon Sep 17 00:00:00 2001 From: Amos Yuen Date: Wed, 20 Jul 2022 07:15:17 +0000 Subject: [PATCH] Filter out empty string IP addreses (#85) --- custom_components/tplink_deco/coordinator.py | 2 +- custom_components/tplink_deco/manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/tplink_deco/coordinator.py b/custom_components/tplink_deco/coordinator.py index 6d21457..78a73d2 100644 --- a/custom_components/tplink_deco/coordinator.py +++ b/custom_components/tplink_deco/coordinator.py @@ -27,7 +27,7 @@ def bytes_to_bits(bytes_count): def filter_invalid_ip(ip_address): - return None if ip_address == "UNKNOWN" else ip_address + return None if ip_address == "UNKNOWN" or not ip_address else ip_address def snake_case_to_title_space(str): diff --git a/custom_components/tplink_deco/manifest.json b/custom_components/tplink_deco/manifest.json index cd33cce..7275928 100644 --- a/custom_components/tplink_deco/manifest.json +++ b/custom_components/tplink_deco/manifest.json @@ -4,7 +4,7 @@ "documentation": "https://github.com/amosyuen/ha-tplink-deco", "issue_tracker": "https://github.com/amosyuen/ha-tplink-deco/issues", "iot_class": "local_polling", - "version": "2.1.1", + "version": "2.1.2", "config_flow": true, "dependencies": [], "codeowners": ["@amosyuen"],