Detect and save media_player source change?


I’m using an Harmony remote for years, but my TV provider now uses an Android box for BT remote control, which controls all HDMI device with CEC…
I still want to control my TV & DVR with the harmony remote, but today it doesn’t detect when the TV is playing, and everything is unsynced.

Is there a way to detect and safe media_plater source changes?
I was looking to use such a trick to save and update the Harmony source when detected, but I see only services to change source on the media_player, no event triggered when the source.
Maybe I should set a */1 minute script to pull the soruce information is that’s possible?

Any ideas?