We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1e96d9b + 3d87474 commit a67771eCopy full SHA for a67771e
custom_components/airthings_wave/sensor.py
@@ -132,11 +132,11 @@ def transform(self, value):
132
133
class RadonSensor(Sensor):
134
def get_extra_attributes(self, data):
135
- if VERY_LOW[0] <= float(data) <= VERY_LOW[1]:
+ if float(data) <= self.transform(VERY_LOW[1]):
136
radon_level = VERY_LOW[2]
137
- elif LOW[0] <= float(data) <= LOW[1]:
+ elif float(data) <= self.transform(LOW[1]):
138
radon_level = LOW[2]
139
- elif MODERATE[0] <= float(data) <= MODERATE[1]:
+ elif float(data) <= self.transform(MODERATE[1]):
140
radon_level = MODERATE[2]
141
else:
142
radon_level = HIGH[2]
0 commit comments