From eb129ca16b8ea1206a52cb8c22df88f5326d550f Mon Sep 17 00:00:00 2001 From: Dmitry Krasnoukhov Date: Fri, 18 Oct 2024 11:36:09 +0300 Subject: [PATCH] Improve D103 check (#19) --- custom_components/smart_maic/sensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/smart_maic/sensor.py b/custom_components/smart_maic/sensor.py index 144fa80..47fad2c 100644 --- a/custom_components/smart_maic/sensor.py +++ b/custom_components/smart_maic/sensor.py @@ -216,7 +216,7 @@ async def async_setup_entry( ) # NOTE: check if we're dealing with 3-phase device like D103 - if coordinator.data.get("A1"): + if "A1" in coordinator.data: async_add_entities( [ SmartMaicPhaseTotalSensor(hass, coordinator, entry, description)