Repository navigation
Card and tiles also as a dashboard resource (0.7.1) - #12
Merged
Merged
Conversation
The companion app did not always load the card from the extra modules of the start page, then the tiles showed a configuration error. The integration now also keeps card.js (which loads the tiles) as a dashboard resource (storage mode), updates its version and removes it with the integration. Same fix as in AI Heating Assistant 1.4.2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GC3Jbmd6Vr4qXPkRDxcSs3
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.
Problem
In the companion app the tiles (
custom:shutter-assistant-tile,custom:shutter-assistant-window-tile) sometimes showed a configuration error when a dashboard was opened. The app does not always load the extra modules of the start page (add_extra_js_url), so the card types were not defined yet. In the browser it works.Fix
Same fix as in AI Heating Assistant 1.4.2:
panel.py:async_set_card_resourcealso keepscard.js(which importstiles.js) as a dashboard resource when resources are managed in the UI (storage mode). A new version updates the entry instead of adding a second one.__init__.py: the resource is removed together with the integration.manifest.json:lovelaceinafter_dependencies, version 0.7.1.Tests
tests/ha/test_card_resource.py: add, update, remove, and no error without Lovelace.ruff checkclean,pytest: 207 passed.Generated by Claude Code