forked from home-assistant/core
Gracefully handle additional GSM errors (#54114)
This commit is contained in:
committed by
Paulus Schoutsen
parent
890d190612
commit
07f8236e6f
@@ -25,6 +25,10 @@ class Gateway:
|
||||
await self._worker.set_incoming_sms_async()
|
||||
except gammu.ERR_NOTSUPPORTED:
|
||||
_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:
|
||||
await self._worker.set_incoming_callback_async(self.sms_callback)
|
||||
|
||||
|
Reference in New Issue
Block a user