mirror of
https://github.com/home-assistant/core.git
synced 2025-04-30 20:27:57 +00:00
Avoid mutating entity descriptions in tomorrowio (#105975)
This commit is contained in:
parent
77c72f2402
commit
94d22c936e
@ -92,8 +92,9 @@ class TomorrowioSensorEntityDescription(SensorEntityDescription):
|
|||||||
)
|
)
|
||||||
|
|
||||||
if self.value_map is not None:
|
if self.value_map is not None:
|
||||||
self.device_class = SensorDeviceClass.ENUM
|
options = [item.name.lower() for item in self.value_map]
|
||||||
self.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
|
# From https://cfpub.epa.gov/ncer_abstracts/index.cfm/fuseaction/display.files/fileID/14285
|
||||||
|
Loading…
x
Reference in New Issue
Block a user