mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
Gracefully handle additional GSM errors (#54114)
This commit is contained in:
parent
1cc3ffe20d
commit
19adce844c
@ -25,6 +25,10 @@ class Gateway:
|
|||||||
await self._worker.set_incoming_sms_async()
|
await self._worker.set_incoming_sms_async()
|
||||||
except gammu.ERR_NOTSUPPORTED:
|
except gammu.ERR_NOTSUPPORTED:
|
||||||
_LOGGER.warning("Your phone does not support incoming SMS notifications!")
|
_LOGGER.warning("Your phone does not support incoming SMS notifications!")
|
||||||
|
except gammu.GSMError:
|
||||||
|
_LOGGER.warning(
|
||||||
|
"GSM error, your phone does not support incoming SMS notifications!"
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
await self._worker.set_incoming_callback_async(self.sms_callback)
|
await self._worker.set_incoming_callback_async(self.sms_callback)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user