mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 04:37:06 +00:00
Fix a bug where a single long sms message is sent as multiple… (#34508)
This commit is contained in:
parent
0d598dd6d6
commit
b73c774b07
@ -48,15 +48,11 @@ class SMSNotificationService(BaseNotificationService):
|
|||||||
|
|
||||||
# Send messages
|
# Send messages
|
||||||
for encoded_message in encoded:
|
for encoded_message in encoded:
|
||||||
# Prepare message data
|
# Fill in numbers
|
||||||
gammu_message = {
|
encoded_message["SMSC"] = {"Location": 1}
|
||||||
"Text": encoded_message["Text"],
|
encoded_message["Number"] = self.number
|
||||||
# We tell that we want to use first SMSC number stored in phone
|
|
||||||
"SMSC": {"Location": 1},
|
|
||||||
"Number": self.number,
|
|
||||||
}
|
|
||||||
try:
|
try:
|
||||||
# Actually send the message
|
# Actually send the message
|
||||||
self.gateway.SendSMS(gammu_message)
|
self.gateway.SendSMS(encoded_message)
|
||||||
except gammu.GSMError as exc: # pylint: disable=no-member
|
except gammu.GSMError as exc: # pylint: disable=no-member
|
||||||
_LOGGER.error("Sending to %s failed: %s", self.number, exc)
|
_LOGGER.error("Sending to %s failed: %s", self.number, exc)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user