So I've automated my receiver to turn on and change to the correct input as soon as I begin playing music on my Chromecast Audio (so no CEC). And that part works...When I begin playing something on the CA device, the Source changes successfully as expected, and triggers the rule.
However the status does not change from idle, and once playback has begun, the Source will not change back to None if playback is stopped. (So next time the rule can't trigger because source won't update), and you can't use Hubitat to control the CA ... At first...
After about 30 seconds I receive this error...
errorjava.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Boolean (parse)
Once the error occurs I am then able to control the CA from within Hubitat (by either pressing play, pause, or stop). To have the statuses update i must press play from within Hubitat (or refresh if the music was stopped or the source changed prior to the error), and then everything will update correctly until the music is stopped.
As it stands now I have added a repeat to my rule. When the rule is triggered, and after the receiver is on and the input is correctly selected, Hubitat repeats pressing play and refresh until either the status changes to playing (because that's what's being pressed) or the source changes back to None (for if the music stopped before the error). But that's not really ideal. If I pause the music via Google before the error occurs, then because Hubitat is pressing play, it will restart playback immediately after the error occurs.
Thoughts?