feat: Absender/Titel frei wählbar, kein "Notruf"-Default mehr (0.1.2)

"Notruf" war als Library/CLI-Default falsch — das gehört in die Bridge-Config,
nicht ins Allzweck-Tool. Jetzt:

- kein eingebauter Default-Absender; ohne Angabe nutzt seven.io den
  Kontostandard-Absender (send_sms lässt "from" dann weg)
- CLI --from für SMS (Absender/Titel) und Voice (Caller-ID); zusätzlich
  $SEVEN_SMS_FROM / $SEVEN_VOICE_FROM als persistenter Default
- Tests: Default ohne Absender, per-call-Override, CLI --from + Env (19 gesamt)
- README: Absender/Titel dokumentiert

Die Bridge übergibt sms_from="Notruf" weiterhin explizit -> Voice Assistant
unverändert.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Dieter Schlüter 2026-06-25 13:00:02 +02:00
commit 1344d1f7e9
7 changed files with 64 additions and 10 deletions

View file

@ -51,3 +51,27 @@ def test_cli_missing_key(monkeypatch, capsys):
rc = cli.main(["sms", "--to", "+49", "--text", "Hi"])
assert rc == 2
assert "Konfig-Fehler" in capsys.readouterr().err
def test_cli_sms_from_flag(monkeypatch):
monkeypatch.delenv("SEVEN_SMS_FROM", raising=False)
cap = []
_patch(monkeypatch, cap)
cli.main(["--api-key", "k", "sms", "--to", "+49", "--text", "Hi", "--from", "Firma"])
assert cap[0]["data"]["from"] == "Firma"
def test_cli_sms_no_from_by_default(monkeypatch):
monkeypatch.delenv("SEVEN_SMS_FROM", raising=False)
cap = []
_patch(monkeypatch, cap)
cli.main(["--api-key", "k", "sms", "--to", "+49", "--text", "Hi"])
assert "from" not in cap[0]["data"]
def test_cli_sms_from_env(monkeypatch):
monkeypatch.setenv("SEVEN_SMS_FROM", "EnvAbs")
cap = []
_patch(monkeypatch, cap)
cli.main(["--api-key", "k", "sms", "--to", "+49", "--text", "Hi"])
assert cap[0]["data"]["from"] == "EnvAbs"