A while ago I came across this (https://harizanov.com/2013/12/control-lg-smart-tv-over-the-internet-using-a-raspberry-pi/) script. It allows you to control your LG tv from a Raspberry PI.
I couldn’t get it to work on our tv, but with some modifications I did get it to work.
In ‘my’ version I’ve disabled the tv search and the IP address should be configured to be static.
You can find it here: https://github.com/rikki78/Scripts/blob/master/lg-control.py
So if you add some rules now you can control your tv from Pimatic!
The bad news is you can’t switch on the tv with it. \
Have fun with it!