I need to invert the value of my Chromecast idle state, so that I can add it to a group together with my PCs state from the network binding and they behave in the same way:
ON - when the device is active
OFF - when the device is in active
I know could use the proxy switch, but I thought I would try the mapping service, which unfortunately I cannot get to work. This is what I have:
I installed the mapping service in addons.cfg
and saw in the logs, that it was installed:
transformation = map
In chromecast.items
:
Switch Chromecast_Livingroom_Idle "Chromecast Livingroom Idle" <network> (gAssistent) { channel="chromecast:chromecast:livingroom:idling" }
Switch Chromecast_Livingroom_Active "Chromecast Livingroom Active" <network> (gAssistent) { channel="chromecast:chromecast:livingroom:idling", profile="transform:MAP", function="on_off_invert.map" }
In on_off_invert.map
:
OFF=ON
ON=OFF
Any help would be much appreciated.