Avoid mutating entity descriptions in tomorrowio (#105975)
This commit is contained in:
parent
77c72f2402
commit
94d22c936e
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue