From eea66921bb45a37ae624a53368e83eefa7fbed40 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 27 Apr 2024 10:48:05 -0500 Subject: [PATCH] Avoid update call in entity state write if there is no customize data (#116296) --- homeassistant/helpers/entity.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/homeassistant/helpers/entity.py b/homeassistant/helpers/entity.py index a2fc16f8a82..b185e3316c5 100644 --- a/homeassistant/helpers/entity.py +++ b/homeassistant/helpers/entity.py @@ -1189,8 +1189,10 @@ class Entity( ) # Overwrite properties that have been set in the config file. - if customize := hass.data.get(DATA_CUSTOMIZE): - attr.update(customize.get(entity_id)) + if (customize := hass.data.get(DATA_CUSTOMIZE)) and ( + custom := customize.get(entity_id) + ): + attr.update(custom) if ( self._context_set is not None