|
14 | 14 | _LOGGER = logging.getLogger(__name__) |
15 | 15 |
|
16 | 16 | # 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)" |
21 | 27 | } |
22 | | - }, |
23 | | - "gateway_settings": { |
| 28 | + }, |
| 29 | + "gateway_settings": { |
24 | 30 | "title": "Gateway Settings", |
25 | 31 | "description": "Configure the SMS gateway for phone number {phone_number}", |
26 | 32 | "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 | +} |
35 | 41 |
|
36 | 42 | class MeshCoreSMSGateway: |
37 | 43 | """MeshCore SMS Gateway - Simple version.""" |
|
0 commit comments