madmicio / LG-WebOS-Remote-Control

Remote Control for LG TV WebOS
393 stars 74 forks source link

Remove requirement for mac address #86

Closed pantherale0 closed 2 years ago

pantherale0 commented 2 years ago

Typical me didn't read the changelog when updating, and realised that having to specify a mac address is required.

I have a complicated setup where the TV sits on a different network to the HA server, so specifying the mac alone isn't enough to turn the TV on, I also need to specify the broadcast address.

To give some flexibility, I've updated a couple of the methods and removed the mac address configuration.. Basically, you can specify a mac address and it will send a magic packet as before, but if you don't specify a mac address it will use the standard turn_on action under the media_player domain... That will then trigger the "Device is requested to be turned on" event for the entity so we can specify a more advanced WOL or add further actions (such as to pause speakers, send a notification etc.)