ha(ux): пробинг отдаёт fatal-reason (одна сессия на недоступном модуле); SWITCH_PROPS без битов

This commit is contained in:
2026-09-29 18:12:31 +03:00
parent 976a2dcbb8
commit 5f09716dce
6 changed files with 25 additions and 20 deletions
+1 -1
View File
@@ -580,7 +580,7 @@ async def test_run_trial_probes_unknown_model(hass: HomeAssistant):
from custom_components.fglair import config_flow as cf
with patch.object(
cf, "probe_template", return_value=(Template.B, {})
cf, "probe_template", return_value=(Template.B, {}, None)
) as probe, patch.object(
cf, "trial_connect", return_value=TrialResult(ok=True)
):
+2 -1
View File
@@ -115,7 +115,8 @@ def test_probe_stops_on_unreachable(monkeypatch):
return tr.TrialResult(ok=False, reason="unreachable")
monkeypatch.setattr(tr, "trial_connect", fake_trial)
template, props = tr.probe_template("host", "dsn", "key", 1)
template, props, fatal = tr.probe_template("host", "dsn", "key", 1)
assert template is None
assert props == {}
assert fatal == "unreachable"
assert calls == [Template.A]