Updates to Environment Canada components (#25973)
* Bump env_canada to 0.0.21 * Add timestamp attribute to camera * Bump env_canada to 0.0.23 * Clean up displayed values * Validate radar station code * Bump env_canada to 0.0.24 * Black * Remove default "None" from sensor * Switch to cv.matches_regex
This commit is contained in:
1 parent
6907e8e9dc
commit
fc716a45c9
4 files changed
+13
-4
No files matched your search
@@ -133,10 +133,15 @@ class ECSensor(Entity):
|
||||
ATTR_TIME: " | ".join([str(s.get("date")) for s in value]),
|
||||
}
|
||||
)
|
||||
elif self.sensor_type == "tendency":
|
||||
self._state = str(value).capitalize()
|
||||
else:
|
||||
self._state = value
|
||||
|
||||
if sensor_data.get("unit") == "C":
|
||||
if sensor_data.get("unit") == "C" or self.sensor_type in [
|
||||
"wind_chill",
|
||||
"humidex",
|
||||
]:
|
||||
self._unit = TEMP_CELSIUS
|
||||
else:
|
||||
self._unit = sensor_data.get("unit")
|
||||
|
||||
Reference in new issue
Block a user