Repository navigation
Claude/dscript module stability 1lr552 - #1
Merged
Merged
Conversation
- Create dScriptBoardHA (reverse DNS + GetStatus + GetConfig over blocking sockets) in an executor instead of the event loop. - Add async_check_available(); heartbeats only run a lightweight GetStatus (config changes are detected by ValidateBoardConfig right after - before, the full InitBoard updated the counts first so new entities were never detected) and the board sensor uses the async check as well. - Availability checks reset the firmware marker first so a board that stops answering is actually reported unavailable; check_available returns True on success (heartbeats logged "unavailable" every time). - Board sensor polls the web page via the shared aiohttp session with a 10s timeout and always closes the connection (urlopen had no timeout and leaked connections on the board). - Await and import async_dScript_GetEntityByUniqueID in ValidateBoardConfig (was an undefined name). - Require dScriptModule>=3.5.0 (request serialization, timeouts). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NVLmxv3Hbmdd6Nzf6zPp3p
- manifest.json: config_flow must be a boolean, keys sorted as required by hassfest, add issue_tracker. - services.yaml: "dscription" typos made the file invalid; the entity selector of updatebutton had integration and domain swapped. - hacs.json: remove iot_class (not a hacs.json key, belongs to manifest). - Options flow: do not assign config_entry on HA versions that provide it as a property (raises AttributeError since HA 2025.12, the options dialog could not be opened). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NVLmxv3Hbmdd6Nzf6zPp3p
- validate.yml: hassfest and HACS action (brands check ignored until the integration is listed in home-assistant/brands). - tests.yml: pytest with pytest-homeassistant-custom-component. - Tests: config/options flow, setup/unload with the integrated dScriptServer, end-to-end with an emulated board (heartbeat creates entities, light control, push updates, no duplicate entities on repeated heartbeats, requests to a board are never parallel). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NVLmxv3Hbmdd6Nzf6zPp3p
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NVLmxv3Hbmdd6Nzf6zPp3p
The debug message at the end of the availability check had 10 placeholders but 9 arguments. With debug logging enabled (as in the GitHub workflow) pytest raises on such formatting errors, so board setup and entry unload aborted; in production the log lines were lost. Same for the unload listener message and the heartbeat service messages. - pytest.ini: log_level = DEBUG so local runs behave like CI - tests/test_logging_calls.py checks all logging calls via AST Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NVLmxv3Hbmdd6Nzf6zPp3p
- The board sensor polls the small page status.htm (firmware >= 3.9) instead of index.htm. It carries temperature, voltage and load, so the extra GetStatus connection every 10th poll is no longer needed. Boards without the page (404) fall back to index.htm + GetStatus as before; status.htm is retried every 20 polls (firmware update). - New diagnostic sensors per board, disabled by default: temperature, voltage and load (dScript instructions/s, maximum of the last minute, attribute last_second). They are updated via a dispatcher signal of the board sensor (no own polling, no extra connection). The existing attributes of the board sensor are unchanged. - Tests for the status page and the fallback on older firmware. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NVLmxv3Hbmdd6Nzf6zPp3p
17 .pyc files were committed although .gitignore excludes __pycache__/; they changed with every local Python run. Files stay on disk. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NVLmxv3Hbmdd6Nzf6zPp3p
- Temperature and voltage are separate diagnostic sensors now, the duplicate attributes of the board sensor are removed. - sw_version / firmware attributes are read live from the board object (were fixed at entity creation, stale after a firmware update). - status.htm also updates the app version, as the former GetStatus on every 10th poll did (that GetStatus only refreshed module id, versions, voltage and temperature; entity counts come from GetConfig on every heartbeat and are not affected). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NVLmxv3Hbmdd6Nzf6zPp3p
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.