From 8e9946afc9d66c96296766073cf8f4a4627f0ad0 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 20 Feb 2024 14:12:06 -0600 Subject: [PATCH] Remove update_before_add from nut sensors (#111032) --- homeassistant/components/nut/sensor.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/nut/sensor.py b/homeassistant/components/nut/sensor.py index e4721d2d41c8f8..e8290f5fa6d073 100644 --- a/homeassistant/components/nut/sensor.py +++ b/homeassistant/components/nut/sensor.py @@ -984,7 +984,7 @@ async def async_setup_entry( if KEY_STATUS in resources: resources.append(KEY_STATUS_DISPLAY) - entities = [ + async_add_entities( NUTSensor( coordinator, SENSOR_TYPES[sensor_type], @@ -992,9 +992,7 @@ async def async_setup_entry( unique_id, ) for sensor_type in resources - ] - - async_add_entities(entities, True) + ) class NUTSensor(CoordinatorEntity[DataUpdateCoordinator[dict[str, str]]], SensorEntity):