I use Alexa with HA to change my TV channels. (“Alexa, turn on one”) I use a Broadcom RM with an MQTT/python interface (easier to maintain than using the HA alternative imho).
However, HA always thinks that I have a switch on when I change channel. Is there an easy way to tell the switch to turn itself off as soon as it has switched on?