File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -90,12 +90,14 @@ def _detect_low_batteries(self) -> list[str]:
9090 message : str | None = notification .get ("message" )
9191 warning : str | None = notification .get ("warning" )
9292 notify = message or warning
93+ LOGGER .debug ("HOI result: %s" , notify )
9394 if notify is not None and all (x in notify for x in matches ) and (mac_addresses := mac_pattern .findall (notify )):
9495 mac_address = mac_addresses [0 ] # re.findall() outputs a list
9596
96- if mac_address is not None and message is not None : # only block message-type notifications
97- self ._notifications .pop (msg_id )
97+ if mac_address is not None :
9898 mac_address_list .append (mac_address )
99+ if message is not None : # only block message-type notifications
100+ self ._notifications .pop (msg_id )
99101
100102 return mac_address_list
101103
You can’t perform that action at this time.
0 commit comments