Skip to content

Commit f99bd0b

Browse files
committed
Fix: PHONE_REGEX section of gateway.py
1 parent a0724cb commit f99bd0b

File tree

2 files changed

+21
-15
lines changed

2 files changed

+21
-15
lines changed

custom_components/meshcore_sms/gateway.py

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,30 @@
1414
_LOGGER = logging.getLogger(__name__)
1515

1616
# Phone number regex
17-
PHONE_REGEX = re.compile(r'^\+?[1-9]\d{1,14}$': {
18-
"account_sid": "Your Twilio Account SID (starts with AC)",
19-
"auth_token": "Your Twilio Auth Token",
20-
"from_number": "Your Twilio phone number with country code (e.g., +1234567890)"
17+
PHONE_REGEX = re.compile(r'^\+?[1-9]\d{1,14}$')
18+
19+
CONFIG_SCHEMA = {
20+
"twilio_config": {
21+
"title": "Twilio Configuration",
22+
"description": "Enter your Twilio credentials",
23+
"data": {
24+
"account_sid": "Your Twilio Account SID (starts with AC)",
25+
"auth_token": "Your Twilio Auth Token",
26+
"from_number": "Your Twilio phone number with country code (e.g., +1234567890)"
2127
}
22-
},
23-
"gateway_settings": {
28+
},
29+
"gateway_settings": {
2430
"title": "Gateway Settings",
2531
"description": "Configure the SMS gateway for phone number {phone_number}",
2632
"data": {
27-
"bot_name": "Bot Name",
28-
"daily_limit": "Daily SMS Limit",
29-
"meshcore_channel": "MeshCore Channel",
30-
"enable_broadcast": "Enable SMS Broadcast",
31-
"delivery_confirmation": "Send Delivery Confirmations"
32-
},
33-
"data_description)
34-
33+
"bot_name": "Bot Name",
34+
"daily_limit": "Daily SMS Limit",
35+
"meshcore_channel": "MeshCore Channel",
36+
"enable_broadcast": "Enable SMS Broadcast",
37+
"delivery_confirmation": "Send Delivery Confirmations"
38+
}
39+
}
40+
}
3541

3642
class MeshCoreSMSGateway:
3743
"""MeshCore SMS Gateway - Simple version."""

custom_components/meshcore_sms/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"domain": "meshcore_sms",
33
"name": "MeshCore SMS Gateway",
4-
"version": "0.0.6",
4+
"version": "0.0.7",
55
"documentation": "https://github.com/mikewren/meshcore-sms",
66
"issue_tracker": "https://github.com/mikewren/meshcore-sms/issues",
77
"dependencies": ["meshcore"],

0 commit comments

Comments
 (0)