Can you modify it to also change the states of media player.
Am using the states of media player as a sensor to detectvig media player (TV etc) is on or off. But when i turn off the tv itvtakws some time to update. With this function if the tv is turned off by HA it should update the state emmediately wuthbthis function
Can you modify it to also change the states of media player. Am using the states of media player as a sensor to detectvig media player (TV etc) is on or off. But when i turn off the tv itvtakws some time to update. With this function if the tv is turned off by HA it should update the state emmediately wuthbthis function