AlexxIT / YandexStation

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

fix(yandex_station): handle null media_position_updated_at in lyrics … #491

Closed skrashevich closed 2 months ago

skrashevich commented 2 months ago
File "/config/custom_components/yandex_station/camera.py", line 70, in handle_async_mjpeg_stream
    await self.handle_lyrics(response, lyrics, self.lyrics_content_id)
  File "/config/custom_components/yandex_station/camera.py", line 106, in handle_lyrics
    dt = datetime.now(UTC) - entity.media_position_updated_at
         ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TypeError: unsupported operand type(s) for -: 'datetime.datetime' and 'NoneType'
AlexxIT commented 2 months ago

Спасибо. Это неправильный фикс и он уже не актуален.