Add Dutch YAML blueprint + fix code fence stripping and target resolution - #128
Open
joopdo wants to merge 1 commit into
Open
Add Dutch YAML blueprint + fix code fence stripping and target resolution#128joopdo wants to merge 1 commit into
joopdo wants to merge 1 commit into
Conversation
…tion Changes: - Create proper Dutch YAML blueprint (mass_llm_enhanced_assist_blueprint_nl.yaml) matching the structure of EN/FR versions, with fully translated UI labels, descriptions, and Dutch default trigger (speel|luister naar) - Replace old .md documentation file with redirect to new YAML - Fix LLM response parsing: strip markdown code fences before from_json (some LLMs like Claude wrap JSON in backtick blocks despite instructions) - Fix target resolution: llm_target now checks resolved entity_id/area_id lists instead of raw LLM output, so backup_target is used correctly when areas can't be matched - Fix pre-existing unescaped quotes in EN entity_id template
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.
Created a proper Dutch YAML blueprint (mass_llm_enhanced_assist_blueprint_nl.yaml) matching the EN/FR structure, with fully translated UI labels, descriptions, and Dutch default triggers (speel|luister naar)
Replaced the old .md documentation file with a redirect to the new YAML
Fixed LLM response parsing in EN blueprint: strips markdown code fences (
json) before from_json — some LLMs wrap JSON in backticks despite prompt instructionsFixed target resolution in EN blueprint: llm_target now checks the resolved entity_id/area_id lists instead of raw LLM output, so backup_target is correctly used when areas can't be matched
Fixed pre-existing unescaped single quotes in EN entity_id template
Why
The Dutch version was only a .md doc with translation suggestions, not an importable blueprint
LLMs like Claude sometimes return JSON wrapped in code fences, breaking from_json
When Music Assistant players aren't assigned to HA areas, llm_target was true (LLM returned area names) but the resolved lists were empty, causing the automation to skip the backup_target fallback
Testing
Tested with Dutch voice commands ("Speel Phil Collins in de huiskamer") on a setup where MA players have no area assignments — correctly falls back to default player after these fixes.