[WORKAROUND] LG TV Remote

Hi @dennisaion ! I’m trying to implement your code. Were do I have to put the tv.py file and can you confirm your code is working nowadays? I did changed “state:” to “from:” and “to:”. No error on the UI but error on the home assistant log:
ERROR (MainThread) [homeassistant.components.shell_command] Error running command: python3 /home/pi/.homeassistant/tv.py 8, return code: 2 NoneType: None
I placed the tv.py file at top level folder that configurator plugin can access - one level above the config folder.

Hello,
can you explain that to me in more detail? I have a PreWebOs LG TV. What do I have to write in the configuration and where does the TV.py file go? Do I have to write it myself? Sorry for the many questions.

My docker Home Assistant: error tkinter.
Traceback (most recent call last):
File “/config/shell_command/tv.py”, line 4, in
from tkinter import *
File “/usr/local/lib/python3.11/tkinter/init.py”, line 38, in
import _tkinter # If this fails your Python may not be configured for Tk
^^^^^^^^^^^^^^^
ImportError: Error loading shared library libtk8.6.so: No such file or
directory (needed by
/usr/local/lib/python3.11/lib-dynload/_tkinter.cpython-311-x86_64-linux-musl.so)
returncode: 1