I converted the setOn() to call KEY_POWERON and KEY_POWEROFF. This only returns an error if the TV powers off the network adaptor while off. I also adjusted the logic to return off state as well as on for the _getOn() function, based on the isAlive() status result, so that HomeKit show the TV status as on/off instead of always on with errors.
I converted the setOn() to call KEY_POWERON and KEY_POWEROFF. This only returns an error if the TV powers off the network adaptor while off. I also adjusted the logic to return off state as well as on for the _getOn() function, based on the isAlive() status result, so that HomeKit show the TV status as on/off instead of always on with errors.