Open Drafteed opened 3 years ago
Short answer: that should work.
Long answer...
When I first created this package, the ADB library was not very reliable for newer devices. In an effort to make it work better, I used a single ADB command for the update function. This wasn't so bad at first, the command was reasonably short. But as more info got collected by the update function, this ADB command grew in complexity.
To accomplish what you're describing, it's probably better to split the update function into multiple ADB commands, since the ADB library that it uses now (adb-shell
) is pretty reliable. First, check simple stuff, like if the device is on and awake. Then check stuff like the current app and the fields you mentioned. And maybe instead of using a complicated grep command to parse the dumpsys output on the device, just return the full output and parse it in this package.
Hello @JeffLIrion! Thx for work!
dumpsys media_session
return the title of the content being played in themetadata:description
field for apps that use media_session API (YouTube, Spotify, ViMu, Netflix, TiviMate etc..).Is it possible to make this information used in HA
media_title
,media_artist
,media_album
if it provided and active? Like Google Cast integration do. Also i see current media position meta.