Skip to content

feat(config-flow): start new gateways at the profile's default command sessions - #606

Merged
GreenGrassBlueOcean merged 2 commits into
OpenWebNet-HA:v2-phase1-architecturefrom
GreenGrassBlueOcean:feat/default-command-sessions
Oct 2, 2026
Merged

GreenGrassBlueOcean merged 2 commits into
OpenWebNet-HA:v2-phase1-architecturefrom
GreenGrassBlueOcean:feat/default-command-sessions

Conversation

@GreenGrassBlueOcean

Copy link
Copy Markdown
Contributor

Summary

Follow-up to the review on OpenWebNet-HA/OWNd#76: MyHOME only used the gateway profile's max_command_sessions (as the ceiling for the worker count) and never default_command_sessions. New entries hard-coded 1 worker and the options form offered the whole limit, so an F455 user could pick 4 command sessions plus the event session and use all 5 sockets, leaving none for the Legrand app or a reconnect overlap.

  • command_session_default(model) returns the profile's default_command_sessions, clamped to its limit; 1 for unknown models or older OWNd profiles without the field. It works for every gateway profile.
  • New entries start at that default. The options form uses it only when no worker count was ever stored; saved counts are untouched.
  • The options form's worker-count field now states the recommended value, the model's limit and why headroom matters (en/fr/it/nl; the fr/it/nl wording is mine).

Today only MyHomeServer1 has a default above 1 in OWNd 2.0.0b6; F455 follows once OWNd#76 sets its default to 2. No MyHOME change is needed for that.

Tests

  • New tests/test_command_session_default.py covers every profile, unknown models and clamping.

  • One existing assertion updated for the new session_default placeholder. Full suite, ruff and verify_ha_standards.py pass.

  • V2 Architecture: New entities implement handle_event() and do not manually subscribe via async_dispatcher_connect. (No entities touched.)

🤖 Generated with Claude Code

GreenGrassBlueOcean and others added 2 commits October 1, 2026 23:27
…d sessions

A new entry hard-coded one command worker, and the options form offered the
profile's whole limit with no hint that every session plus the event session
takes one of the gateway's few connections (an F455 allows five in all, shared
with the vendor app). command_session_default() now returns the profile's
default_command_sessions, clamped to its limit and 1 for unknown models or
older OWNd profiles, for every gateway. New entries start there, and the
options form says what is recommended and why.

Follow-up to the review on OpenWebNet-HA/OWNd#76.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
CI's pinned OWNd has no H4890 profile, so its limit is None and the default 1.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@GreenGrassBlueOcean
GreenGrassBlueOcean merged commit 705596d into OpenWebNet-HA:v2-phase1-architecture Oct 2, 2026
16 checks passed
@GreenGrassBlueOcean
GreenGrassBlueOcean deleted the feat/default-command-sessions branch October 21, 2026 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants