You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, how can you set the display pages with a fig key by taking a gpio from wemos d1 the following code I tried does not work a help please the code here:
display:
- platform: ssd1306_i2c
model: "SSD1306 128x64"
address: 0x3C
update_interval: 50ms
id: my_display
pages:
- id: page1
lambda: | -
it.printf (0, 2, id (font), "Relay 1:% s", id (relay_1) .state? "ON": "OFF");
it.printf (73, 2, id (font), "Relay 5:% s", id (relay_5) .state? "ON": "OFF");
it.printf (0, 13, id (font), "Relay 2:% s", id (relay_2) .state? "ON": "OFF");
it.printf (73, 13, id (font), "Relay 6:% s", id (relay_6) .state? "ON": "OFF");
it.printf (0, 25, id (font), "Relay 3:% s", id (relay_3) .state? "ON": "OFF");
it.printf (73, 25, id (font), "Relay 7:% s", id (relay_7) .state? "ON": "OFF");
it.printf (0, 37, id (font), "Relay 4:% s", id (relay_4) .state? "ON": "OFF");
it.printf (73, 37, id (font), "Relay 8:% s", id (relay_8) .state? "ON": "OFF");
it.printf (0, 55, id (font), "Wifi:% s", id (status) .value? "Online": "Offline");
it.printf (102, 55, id (font), "% .1f", id (signal) .value);
- id: page2
lambda: | -
it.strftime (0, 35, id (font), "Time:% H:% M", id (time) .now ());
it.strftime (0, 45, id (font), "Date:% d.% m.% Y", id (time) .now ());
with this code on_press gives me error, of course the code is wrong I just wanted to change page with a key
as reported in the guide https://esphome.io/components/display/index.html
I look forward to your help, thanks
The text was updated successfully, but these errors were encountered:
Hi, how can you set the display pages with a fig key by taking a gpio from wemos d1 the following code I tried does not work a help please the code here:
- platform: gpio
name: "Pin D7"
pin: D7
on_press:
- display.page.show_next: my_display
- display.page.show_prev: my_display
display:
- platform: ssd1306_i2c
model: "SSD1306 128x64"
address: 0x3C
update_interval: 50ms
id: my_display
pages:
- id: page1
lambda: | -
it.printf (0, 2, id (font), "Relay 1:% s", id (relay_1) .state? "ON": "OFF");
it.printf (73, 2, id (font), "Relay 5:% s", id (relay_5) .state? "ON": "OFF");
it.printf (0, 13, id (font), "Relay 2:% s", id (relay_2) .state? "ON": "OFF");
it.printf (73, 13, id (font), "Relay 6:% s", id (relay_6) .state? "ON": "OFF");
it.printf (0, 25, id (font), "Relay 3:% s", id (relay_3) .state? "ON": "OFF");
it.printf (73, 25, id (font), "Relay 7:% s", id (relay_7) .state? "ON": "OFF");
it.printf (0, 37, id (font), "Relay 4:% s", id (relay_4) .state? "ON": "OFF");
it.printf (73, 37, id (font), "Relay 8:% s", id (relay_8) .state? "ON": "OFF");
it.printf (0, 55, id (font), "Wifi:% s", id (status) .value? "Online": "Offline");
it.printf (102, 55, id (font), "% .1f", id (signal) .value);
- id: page2
lambda: | -
it.strftime (0, 35, id (font), "Time:% H:% M", id (time) .now ());
it.strftime (0, 45, id (font), "Date:% d.% m.% Y", id (time) .now ());
with this code on_press gives me error, of course the code is wrong I just wanted to change page with a key
as reported in the guide https://esphome.io/components/display/index.html
I look forward to your help, thanks
The text was updated successfully, but these errors were encountered: