AlexxIT / YandexStation

Управление Яндекс.Станцией и другими устройствами умного дома с Алисой из Home Assistant
https://t.me/AlexxIT_SmartHome
MIT License
1.27k stars 119 forks source link

Unexpected error for call_service at pos 6: 'NoneType' object is not subscriptable #473

Closed avbor closed 3 months ago

avbor commented 3 months ago

Перестала работать синхронизация списка покупок. Компонент v3.13.2 HA 2024.2.5

- service: media_player.play_media
  entity_id: media_player.yandex_station_lite_prikhozhaya
  data:
    media_content_id: update
    media_content_type: shopping_list
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 485, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 723, in _async_call_service_step
    response_data = await self._async_run_long_action(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 685, in _async_run_long_action
    return long_task.result()
           ^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2279, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2316, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 892, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 962, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/config/custom_components/yandex_station/core/yandex_station.py", line 858, in async_play_media
    await self._shopping_list()
  File "/config/custom_components/yandex_station/core/yandex_station.py", line 419, in _shopping_list
    alice_list = RE_SHOPPING.findall(card["text"])
                                     ~~~~^^^^^^^^
TypeError: 'NoneType' object is not subscriptable
AlexxIT commented 3 months ago

471