Adeptive / homebridge-samsungtv

Apache License 2.0
21 stars 35 forks source link

implement POWERON and POWEROFF as the power switch. improved _getOn(… #5

Open apwelsh opened 8 years ago

apwelsh commented 8 years ago

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.