From 94d22c936ec10580a78f64fd7aaff8ce24ac970c Mon Sep 17 00:00:00 2001
From: Erik Montnemery <erik@montnemery.com>
Date: Mon, 18 Dec 2023 13:57:11 +0100
Subject: [PATCH] Avoid mutating entity descriptions in tomorrowio (#105975)

---
 homeassistant/components/tomorrowio/sensor.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/homeassistant/components/tomorrowio/sensor.py b/homeassistant/components/tomorrowio/sensor.py
index 947bbf6fd2f..88b5af79604 100644
--- a/homeassistant/components/tomorrowio/sensor.py
+++ b/homeassistant/components/tomorrowio/sensor.py
@@ -92,8 +92,9 @@ class TomorrowioSensorEntityDescription(SensorEntityDescription):
             )
 
         if self.value_map is not None:
-            self.device_class = SensorDeviceClass.ENUM
-            self.options = [item.name.lower() for item in self.value_map]
+            options = [item.name.lower() for item in self.value_map]
+            object.__setattr__(self, "device_class", SensorDeviceClass.ENUM)
+            object.__setattr__(self, "options", options)
 
 
 # From https://cfpub.epa.gov/ncer_abstracts/index.cfm/fuseaction/display.files/fileID/14285
-- 
GitLab