Skip to content

Commit 5937306

Browse files
committed
Add alert_severity_level
1 parent f6dd572 commit 5937306

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

custom_components/metlink/sensor.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ async def async_update(self):
324324
self.attrs[ATTR_ALERT_URL + suffix + alert_suffix] = get_translation(alert.get(ATTR_URL, {}))
325325
self.attrs[ATTR_ALERT_CAUSE + suffix + alert_suffix] = alert.get(ATTR_CAUSE, "")
326326
self.attrs[ATTR_ALERT_EFFECT + suffix + alert_suffix] = alert.get(ATTR_EFFECT, "")
327+
self.attrs[ATTR_ALERT_SEVERITY_LEVEL + suffix + alert_suffix] = alert.get(ATTR_SEVERITY_LEVEL, "")
327328

328329
num_alert += 1
329330

@@ -335,6 +336,7 @@ async def async_update(self):
335336
ATTR_ALERT_URL,
336337
ATTR_ALERT_CAUSE,
337338
ATTR_ALERT_EFFECT,
339+
ATTR_ALERT_SEVERITY_LEVEL,
338340
]:
339341
prefix = f"{alert_prefix}{suffix}_"
340342
for attr in self.attrs:
@@ -378,6 +380,7 @@ async def async_update(self):
378380
ATTR_ALERT_URL,
379381
ATTR_ALERT_CAUSE,
380382
ATTR_ALERT_EFFECT,
383+
ATTR_ALERT_SEVERITY_LEVEL,
381384
]:
382385
prefix = f"{alert_prefix}{suffix}"
383386
for attr in self.attrs:

0 commit comments

Comments
 (0)