From 672991e05b0fa55bc6f740d0c471d00213da342a Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Tue, 20 Oct 2026 15:57:08 +0200 Subject: [PATCH] Group sequential add_entities calls in Neurio energy (#187522) Co-authored-by: Claude --- homeassistant/components/neurio_energy/sensor.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/homeassistant/components/neurio_energy/sensor.py b/homeassistant/components/neurio_energy/sensor.py index 1ca520def989..13231cdec13a 100644 --- a/homeassistant/components/neurio_energy/sensor.py +++ b/homeassistant/components/neurio_energy/sensor.py @@ -75,22 +75,18 @@ def setup_platform( update_daily() update_active() - # Active power sensor - add_entities([NeurioEnergy(data, ACTIVE_NAME, ACTIVE_TYPE, update_active)]) - # Daily power sensor - add_entities([NeurioEnergy(data, DAILY_NAME, DAILY_TYPE, update_daily)]) - # Active generation sensor add_entities( [ + NeurioEnergy(data, ACTIVE_NAME, ACTIVE_TYPE, update_active), + NeurioEnergy(data, DAILY_NAME, DAILY_TYPE, update_daily), NeurioEnergy( data, ACTIVE_GENERATION_NAME, ACTIVE_GENERATION_TYPE, update_active - ) + ), + NeurioEnergy( + data, DAILY_GENERATION_NAME, DAILY_GENERATION_TYPE, update_daily + ), ] ) - # Daily generation sensor - add_entities( - [NeurioEnergy(data, DAILY_GENERATION_NAME, DAILY_GENERATION_TYPE, update_daily)] - ) class NeurioData: