Closed bbostock closed 2 years ago
I suppose that is where you set up the entities:
- platform: nextion
name: $device_name Light 1 button
page_id: 2
component_id: 18
on_click:
- homeassistant.service:
service: light.toggle # this probably needs to be changed to input_boolean.toggle
data:
entity_id: light.sonoff_1000cb7905 # and here
But how did you "enable" the second screen?
The ESP seems to be rather overwhelmed by all entities that are added. A serious improvement would be to re-design the setup with a HA blueprint. The blueprint would then push values on change (such as a light state changing) to the ESP instead of the ESP subscribing to HA events. Especially the text entities seem to be resource consuming. The current setup is not ideal, as items such as light labels tend to be rather static and better changed through HA.
The above setup also has the benefit that all config could be done from HA. I.e. the ESPHome part would be rather set-and-forget.
To enable a second light screen, change the number in the very end of the ESPHome code:
# Enable 1 light page (up to 4 available)
- lambda: id(disp1).send_command_printf("Lights.pages.val=1");
I love this implementation, but when I tried to convert a 2nd page of light switches to handle my heating zones defined as input_booleans the panel would no longer boot.
After re-flashing a working binary using my serial adapter I managed to recover the panel.
Is there a recommended way I could support virtual switches using my input_booleans or sensor templates or by some other means?