These days I am falling in playing with esphome.
I made already 3 sensors with esphome and they worked very smooth.
Now I am trying to make another one which is a monitor for homeassistant.
It consists of 1 nextion display and 1 wemos d1mini. That’s all.
It displays some sensor data from homeassistant and control some fans and switches from homeassistant.
There are 2 pages on nextion display.
Page0 has one image and one text component for example.
Page1 has the same components.
I want that touch on page0 can go to the other page and vice versa.
I made two pages with nextion editor. there is no error.
But I don’t know how to define and code on esphome side.
Unfortunately, it didn’t work.
When I compiled, the error showed that nextion display did not have ‘pages’ as an option.
I have tried to find a reference or guide, but I couldn’t.
I didn’t find a solution from official docs, so I found the way by myself.
I used 2 components, global variable and binary sensor to display multi pages.
I give you some sample codes to you.
I think you could easily understand what I did.
manual_ip:
# Set this to the IP of the ESP
static_ip: 192.168.1.78
# Set this to the IP address of the router.
gateway: 10.0.0.1
# The subnet of the network. 255.255.255.0 works for most home networks.
subnet: 255.255.255.0
api:
ota:
logger:
baud_rate: 0 # Disable UART logging (pins GPIO1/3 are used for Nextion communication)
first of all,
you don’t have to use global variable to show temperature in nextion.
instead, you can use this syntax to show temperature.
I assume that you use text component and it’s object name is t1.
also, name of id can not contain .
logs showed that any sensor data for “inside” didn’t come from homeassistant.
you have to check that sensor.temperatura1.
is sensor.temperatura1 correct? any mis typo?
it might be “sensor.temperature1”