I’m trying to build a thermostat based on a Wemos D1 mini + a Nextion display.
A key requirement is the ability to set a target temperature on the Nextion UI
(in “manual” mode) and keep this value regardless the communication with HA is
active or not.
To make a long story short, I need to build a page with two buttons that increment
or decrement the temperature set point, and send the adjusted setpoint back to Esphome,
to allow local temperature regulation.
Now, I wonder if there is a way to “read” a component or a variable value from Nextion (i.e. the adjusted setpoint).
I know how to write it, I can “read” events (with binary_sensor), but haven’t found a way
to get a numeric value or a string.
Nextion has a “get” command (get t0.txt // sends text contents of t0.txt in 0x70 Return Data format),
but it seems not supported by EspHome.
Any hints on how this problem can be solved?
I don’t know if they help, but there are some nextion examples here https://esphome.io/guides/diy.html
did you ever solve this?
Not on the Nextion side. At the end I used binary sensors to intercept the + and - pushbuttons and then the logic to change the setpoint is implemented in Esphome.
1 Like
That is the way, there are only 2 nextion components in esphome, a binary sensor an the display component.
Hi, Salvatore Virtuoso,
Can you explain how did you solve the problem. I am facing same problem…
Thanks…