How to configure LG webos tv so that it can be turned on/off from HA

Hi all. I am trying use the code on webos integration page to get the power button in the LG card. I tried in both automations.yaml and configuration.yaml but it is not working. Any help is appreciated.