mirror of
https://github.com/boneIO-eu/esphome.git
synced 2026-04-11 04:50:29 +02:00
remove ip address from display
This commit is contained in:
@@ -30,7 +30,7 @@ text_sensor:
|
|||||||
|
|
||||||
script:
|
script:
|
||||||
- id: screensaver_script
|
- id: screensaver_script
|
||||||
# screensaver script, turn on screensaver after 30 seconds, restart counter each time when invoked
|
# screensaver script, turn on screensaver after 30 seconds, restart counter each time when invoked
|
||||||
mode: restart
|
mode: restart
|
||||||
then:
|
then:
|
||||||
# set the time after which the screensaver will be activated
|
# set the time after which the screensaver will be activated
|
||||||
@@ -63,7 +63,7 @@ binary_sensor:
|
|||||||
# woke up when on the screensaver, as well do not include the logo page and screensaver in a loop when pushing a button
|
# woke up when on the screensaver, as well do not include the logo page and screensaver in a loop when pushing a button
|
||||||
- if:
|
- if:
|
||||||
condition:
|
condition:
|
||||||
# on the last page go to the first page skipping the screensaver and logo page
|
# on the last page go to the first page skipping the screensaver and logo page
|
||||||
display.is_displaying_page: last_page
|
display.is_displaying_page: last_page
|
||||||
then:
|
then:
|
||||||
- display.page.show: first_page
|
- display.page.show: first_page
|
||||||
@@ -71,7 +71,7 @@ binary_sensor:
|
|||||||
else:
|
else:
|
||||||
- if:
|
- if:
|
||||||
condition:
|
condition:
|
||||||
# on the screensaver, show the logo for a while and display the first page
|
# on the screensaver, show the logo for a while and display the first page
|
||||||
display.is_displaying_page: screensaver
|
display.is_displaying_page: screensaver
|
||||||
then:
|
then:
|
||||||
- display.page.show: logo_page
|
- display.page.show: logo_page
|
||||||
@@ -80,16 +80,18 @@ binary_sensor:
|
|||||||
- display.page.show: first_page
|
- display.page.show: first_page
|
||||||
- component.update: oled_display
|
- component.update: oled_display
|
||||||
else:
|
else:
|
||||||
# not the last page and screensaver go to the next page
|
# not the last page and screensaver go to the next page
|
||||||
- display.page.show_next: oled_display
|
- display.page.show_next: oled_display
|
||||||
- component.update: oled_display
|
- component.update: oled_display
|
||||||
# restart screensaver script
|
# restart screensaver script
|
||||||
- script.execute: screensaver_script
|
- script.execute: screensaver_script
|
||||||
|
|
||||||
|
# it.printf(4, 37, id(dejaVuSmall), TextAlign::BASELINE_LEFT ,"IP addr:");
|
||||||
|
# it.printf(124, 37, id(dejaVuSmall), TextAlign::BASELINE_RIGHT ,"%s", id(eth).get_ip_addresses().str().c_str());
|
||||||
display:
|
display:
|
||||||
- platform: ssd1306_i2c
|
- platform: ssd1306_i2c
|
||||||
id: oled_display
|
id: oled_display
|
||||||
model: "SH1106 128x64"
|
model: 'SH1106 128x64'
|
||||||
address: 0x3C
|
address: 0x3C
|
||||||
i2c_id: bus_b
|
i2c_id: bus_b
|
||||||
contrast: 0.5
|
contrast: 0.5
|
||||||
@@ -104,8 +106,6 @@ display:
|
|||||||
it.rectangle(0, 0, 126, 15);
|
it.rectangle(0, 0, 126, 15);
|
||||||
it.printf(64,11, id(danubeSmall), TextAlign::BASELINE_CENTER, "BoneIO");
|
it.printf(64,11, id(danubeSmall), TextAlign::BASELINE_CENTER, "BoneIO");
|
||||||
it.strftime(64, 25, id(dejaVuSmall), TextAlign::BASELINE_CENTER ,"%c", id(ds1307_time).now());
|
it.strftime(64, 25, id(dejaVuSmall), TextAlign::BASELINE_CENTER ,"%c", id(ds1307_time).now());
|
||||||
it.printf(4, 37, id(dejaVuSmall), TextAlign::BASELINE_LEFT ,"IP addr:");
|
|
||||||
it.printf(124, 37, id(dejaVuSmall), TextAlign::BASELINE_RIGHT ,"%s", id(eth).get_ip_address().str().c_str());
|
|
||||||
it.printf(4, 49, id(dejaVuSmall), TextAlign::BASELINE_LEFT ,"Uptime:");
|
it.printf(4, 49, id(dejaVuSmall), TextAlign::BASELINE_LEFT ,"Uptime:");
|
||||||
it.printf(124, 49, id(dejaVuSmall), TextAlign::BASELINE_RIGHT ,"%s", id(wt32_uptime).state.c_str());
|
it.printf(124, 49, id(dejaVuSmall), TextAlign::BASELINE_RIGHT ,"%s", id(wt32_uptime).state.c_str());
|
||||||
it.printf(4, 61, id(dejaVuSmall), TextAlign::BASELINE_LEFT ,"Temperature:");
|
it.printf(4, 61, id(dejaVuSmall), TextAlign::BASELINE_LEFT ,"Temperature:");
|
||||||
@@ -128,12 +128,12 @@ display:
|
|||||||
it.fill(COLOR_OFF);
|
it.fill(COLOR_OFF);
|
||||||
|
|
||||||
font:
|
font:
|
||||||
- file: "${dir_name}/fonts/DejaVuSans.ttf"
|
- file: '${dir_name}/fonts/DejaVuSans.ttf'
|
||||||
id: dejaVuSmall
|
id: dejaVuSmall
|
||||||
size: 9
|
size: 9
|
||||||
- file: "${dir_name}/fonts/danube__.ttf"
|
- file: '${dir_name}/fonts/danube__.ttf'
|
||||||
id: danubeBig
|
id: danubeBig
|
||||||
size: 20
|
size: 20
|
||||||
- file: "${dir_name}/fonts/danube__.ttf"
|
- file: '${dir_name}/fonts/danube__.ttf'
|
||||||
id: danubeSmall
|
id: danubeSmall
|
||||||
size: 9
|
size: 9
|
||||||
|
|||||||
Reference in New Issue
Block a user