revert: revert SMS (Telnyx) platform adapter for review
This reverts commit ef67037f8e.
This commit is contained in:
parent
ef67037f8e
commit
fd61ae13e5
13 changed files with 4 additions and 645 deletions
|
|
@ -42,7 +42,6 @@ class Platform(Enum):
|
|||
SIGNAL = "signal"
|
||||
HOMEASSISTANT = "homeassistant"
|
||||
EMAIL = "email"
|
||||
SMS = "sms"
|
||||
|
||||
|
||||
@dataclass
|
||||
|
|
@ -226,9 +225,6 @@ class GatewayConfig:
|
|||
# WhatsApp uses enabled flag only (bridge handles auth)
|
||||
elif platform == Platform.WHATSAPP:
|
||||
connected.append(platform)
|
||||
# SMS uses api_key from env (checked via extra or env var)
|
||||
elif platform == Platform.SMS and os.getenv("TELNYX_API_KEY"):
|
||||
connected.append(platform)
|
||||
# Signal uses extra dict for config (http_url + account)
|
||||
elif platform == Platform.SIGNAL and config.extra.get("http_url"):
|
||||
connected.append(platform)
|
||||
|
|
@ -567,21 +563,6 @@ def _apply_env_overrides(config: GatewayConfig) -> None:
|
|||
name=os.getenv("EMAIL_HOME_ADDRESS_NAME", "Home"),
|
||||
)
|
||||
|
||||
# SMS (Telnyx)
|
||||
telnyx_key = os.getenv("TELNYX_API_KEY")
|
||||
if telnyx_key:
|
||||
if Platform.SMS not in config.platforms:
|
||||
config.platforms[Platform.SMS] = PlatformConfig()
|
||||
config.platforms[Platform.SMS].enabled = True
|
||||
config.platforms[Platform.SMS].api_key = telnyx_key
|
||||
sms_home = os.getenv("SMS_HOME_CHANNEL")
|
||||
if sms_home:
|
||||
config.platforms[Platform.SMS].home_channel = HomeChannel(
|
||||
platform=Platform.SMS,
|
||||
chat_id=sms_home,
|
||||
name=os.getenv("SMS_HOME_CHANNEL_NAME", "Home"),
|
||||
)
|
||||
|
||||
# Session settings
|
||||
idle_minutes = os.getenv("SESSION_IDLE_MINUTES")
|
||||
if idle_minutes:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue