cdnninja/yoto_ha

chapterKey and trackKey mismatch

Closed this issue · 1 comments

I don't know if it matters, and didn't get any errors related to this, but I noticed that when playing Mini Journal (the French version of Yoto Daily) by double pushing the right button, the ChapterKey is "daily" which is properly defined as str in the mqtt api file, but as an int in the manager file. Similar for trackKey.

2024-05-24 10:12:11.438 DEBUG (Thread-2 (_thread_main)) [yoto_api.YotoMQTTClient] yoto_api - MQTT Topic: device/zzz/events
2024-05-24 10:12:11.439 DEBUG (Thread-2 (_thread_main)) [yoto_api.YotoMQTTClient] yoto_api - MQTT Message: {"trackLength":335,"position":0,"cardId":"aD2Xf","repeatAll":false,"source":"button","cardUpdatedAt":"2024-05-23T16:37:52.505Z","chapterTitle":"Mini Journal","chapterKey":"daily","trackTitle":"Episode 145","trackKey":"20240524","streaming":true,"volume":2,"volumeMax":16,"playbackStatus":"playing","playbackWait":false,"sleepTimerActive":false,"eventUtc":1716538330}

image

Python isn't strict typing but regardless should be fixed so I made those changes. Feel free to drop PRs for these. Help is appreciated! Thanks for finding this!