Hello everyone,
currently I am using tasmota running on a Wemos D1 Mini to get multiple states from my LG TV via UART.
I am sending the 4 Serial commands to my tv via a rule every 3 seconds and then I publish the response to a mqtt topic.
rule1 “ON system#boot do backlog event regel=1 endon on event#regel=1 DO Backlog SSerialSend1 kf 01 ff; SSerialSend1 xb 01 ff; SSerialSend1 ka 01 ff; SSerialSend1 ke 01 ff; event regel=1 ENDON”
rule2 “on SSerialReceived#data do publish Haus/Erdgeschoss/Wohnzimmer/LG_TV/stat/RS232 {“Value”:”%value%"} endon"
I then receive for example multiple values:
B 01 OK90X → HDMI1
A 01 OK01X → Power ON
F 01 OK09X → Volume 10
E 01 OK01X muted
I want to migrate the whole thing to ESP Home as I sometimes have problems with this tasmota setup and want to try if this is working in ESPHome. Unfortunately I am not very familar with esphome until now.
I already found a project in github, which is providing me the power state (GitHub - staiji/esphome-lgtv_uart: LGTV UART component for ESPHome) and this is working currently.
But I am struggling to extend it for the other 3 values.
Should I create 3 more .h files for each value? Or do I just need to extend the lgtv_uart.h file?
Or is there the possibility to hand over the uart response directly to a sensor in home assistant and based on this sensor i can create templates to provide the state to other values? But how should the sensors in the esphome yaml file be defined?
I would be thankful for a hint in the correct direction. Thanks in advance