fix(shopping): облачный синк списка покупок вместо glagol — фикс KeyError: 'text' (#631) - #804
Open
Dekkee wants to merge 2 commits into
Open
fix(shopping): облачный синк списка покупок вместо glagol — фикс KeyError: 'text' (#631)#804Dekkee wants to merge 2 commits into
Dekkee wants to merge 2 commits into
Conversation
get_notes / get_shopping_note / note_active_items / add_shopping_item / delete_shopping_item via rpc.alice.yandex.ru/gproxy on the same cookie session as alarms (cookie-only, no CSRF). Needed because streaming Alice no longer returns a text card for the local glagol query (issue AlexxIT#631). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Streaming Alice (fair_tts_streaming / enable_partials) returns
{is_streaming: true, cards: []} for the glagol text query, so
shopping_sync/todo_sync crashed with KeyError: 'text' (issue AlexxIT#631).
Read and write the list via the cloud notes API instead of glagol:
completed items are deleted (same semantics as the old glagol sync),
new items are created via create_subtask. No voice feedback during
sync anymore as a side effect.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Dekkee
added a commit
to Dekkee/YandexStation
that referenced
this pull request
Aug 9, 2026
…completed Семантика вернулась к апстримной: галка на пункте = купил = пункт удаляется из списка Алисы (delete_subtask), а не помечается done. mark_bought / clear_bought_items / media_id clear_completed выпилены. Содержимое = ветка fix/shopping-list-cloud-sync (PR в апстрим AlexxIT#804). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Проблема
shopping_sync/todo_syncчитали текущий список Алисы, отправляя по локальному glagol-каналу «Что в списке покупок» и разбираяcard["text"]. Стриминговая Алиса (серверные экспериментыfair_tts_streaming/enable_partials) на этот запрос теперь отвечает{"is_streaming": true, "cards": [], "directives": [{"name": "tts_play_placeholder"}]}— текстовой карточки нет вообще, синк падает сKeyError: 'text', список в HA не обновляется.Fixes #631
Решение
Синк полностью переведён на облачное notes API (
rpc.alice.yandex.ru/gproxy/*) — та же cookie-сессия, что уже используется для будильников, CSRF-токен не нужен:get_notes: «Список покупок» — единственная заметка сtitle == "Список покупок", активные пункты =subtasksсdone == false;create_subtask;delete_subtask: пункт, отмеченный выполненным в HA (галка в To-do / Shopping List), удаляется из списка Алисы — та же семантика, что была у glagol-синка («Удали …»);Затронуто:
core/yandex_quasar.py— новые методы notes API;hass/shopping_list.py,hass/todo_list.py— чтение и запись через облако;core/yandex_station.py— в синк передаётсяquasarвместоglagol.Побочный бонус: колонка больше не проговаривает список и команды при каждом синке (косвенно касается #229 / #688).
Проверка
KeyError: 'text'исчез; галка на пункте в HA удаляет его из списка Алисы, добавленное голосом появляется в HA после синка.py_compileвсех затронутых файлов.🤖 Generated with Claude Code