From ade0f94a207a63c54aff9cac812fc7d832162978 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 31 May 2024 10:11:46 -0500 Subject: [PATCH] Remove duplicate getattr call in entity wrap_attr (#118558) --- homeassistant/helpers/entity.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/helpers/entity.py b/homeassistant/helpers/entity.py index d4e160c2672..ee544883a68 100644 --- a/homeassistant/helpers/entity.py +++ b/homeassistant/helpers/entity.py @@ -365,7 +365,7 @@ class CachedProperties(type): attr = getattr(cls, attr_name) if isinstance(attr, (FunctionType, property)): raise TypeError(f"Can't override {attr_name} in subclass") - setattr(cls, private_attr_name, getattr(cls, attr_name)) + setattr(cls, private_attr_name, attr) annotations = cls.__annotations__ if attr_name in annotations: annotations[private_attr_name] = annotations.pop(attr_name)