I have made some small changes to fix the wrong return value for the getOn method. Without this fix the iOS10 Home application wasn't able to retrieve the current state of the device.
Then I changed the setOn method to evaluate the desired state before triggering the tv. This should be more safely.
Also I think it is better to use the supplied name from the user configuration for the accessory display name to give the user the choice about the names.
I have made some small changes to fix the wrong return value for the getOn method. Without this fix the iOS10 Home application wasn't able to retrieve the current state of the device. Then I changed the setOn method to evaluate the desired state before triggering the tv. This should be more safely.
Also I think it is better to use the supplied name from the user configuration for the accessory display name to give the user the choice about the names.