Support send SMS using GSM alphabet (#76834)
* Fix #76283 Fix #76283 * Update notify.py * Load SMS via discovery * Put back send as ANSIpull/77016/head
parent
1940d9a377
commit
8cd04750fc
|
@ -13,6 +13,7 @@ NETWORK_COORDINATOR = "network_coordinator"
|
|||
GATEWAY = "gateway"
|
||||
DEFAULT_SCAN_INTERVAL = 30
|
||||
CONF_BAUD_SPEED = "baud_speed"
|
||||
CONF_UNICODE = "unicode"
|
||||
DEFAULT_BAUD_SPEED = "0"
|
||||
DEFAULT_BAUD_SPEEDS = [
|
||||
{"value": DEFAULT_BAUD_SPEED, "label": "Auto"},
|
||||
|
|
|
@ -8,7 +8,7 @@ from homeassistant.components.notify import PLATFORM_SCHEMA, BaseNotificationSer
|
|||
from homeassistant.const import CONF_NAME, CONF_RECIPIENT, CONF_TARGET
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
from .const import DOMAIN, GATEWAY, SMS_GATEWAY
|
||||
from .const import CONF_UNICODE, DOMAIN, GATEWAY, SMS_GATEWAY
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -47,9 +47,10 @@ class SMSNotificationService(BaseNotificationService):
|
|||
gateway = self.hass.data[DOMAIN][SMS_GATEWAY][GATEWAY]
|
||||
|
||||
targets = kwargs.get(CONF_TARGET, [self.number])
|
||||
is_unicode = kwargs.get(CONF_UNICODE, True)
|
||||
smsinfo = {
|
||||
"Class": -1,
|
||||
"Unicode": True,
|
||||
"Unicode": is_unicode,
|
||||
"Entries": [{"ID": "ConcatenatedTextLong", "Buffer": message}],
|
||||
}
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue