Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- esphome:
- name: oled2
- platform: ESP32
- board: heltec_wifi_kit_32
- wifi:
- ssid: "xxx"
- password: "xxx"
- # Enable fallback hotspot (captive portal) in case wifi connection fails
- ap:
- ssid: "Oled2 Fallback Hotspot"
- password: "Zf9oas35HAIZ"
- captive_portal:
- # Enable logging
- logger:
- # Enable Home Assistant API
- api:
- ota:
- sensor:
- - platform: homeassistant
- id: solare_temperature
- entity_id: sensor.solare_termico
- internal: true
- - platform: homeassistant
- id: puffer_temperature
- entity_id: sensor.puffer_medio_alto
- internal: true
- - platform: homeassistant
- id: pdc_power
- entity_id: sensor.consumo_attuale_pdc
- internal: true
- time:
- - platform: homeassistant
- id: time1
- i2c:
- sda: GPIO4
- scl: GPIO15
- scan: false
- frequency: 700khz
- font:
- - file: 'arialblk.ttf'
- id: font1
- size: 48
- - file: 'arial.ttf'
- id: font2
- size: 15
- - file: 'arial.ttf'
- id: font3
- size: 8
- image:
- - file: "solar-power.png"
- id: solar_icon
- interval:
- - interval: 3s
- then:
- - display.page.show_next: my_display
- - component.update: my_display
- display:
- - platform: ssd1306_i2c
- model: "SSD1306 128x64"
- reset_pin: GPIO16
- address: 0x3C
- id: my_display
- pages:
- - id: page1
- lambda: |-
- it.printf(40, 1, id(font3), TextAlign::TOP_CENTER, "Solare Termico");
- it.image(1, 30, id(solar_icon));
- it.printf(50, 30, id(font2), TextAlign::BASELINE_LEFT , "%.1f°", id(solare_temperature).state);
- - id: page2
- lambda: |-
- it.printf(1, 30, id(font2), TextAlign::BASELINE_LEFT , "Puffer PDC %.1f°", id(puffer_temperature).state);
- - id: page3
- lambda: |-
- it.printf(1, 45, id(font2), TextAlign::BASELINE_LEFT , "Pot PDC %.1fW", id(pdc_power).state);
- - id: page4
- lambda: |-
- it.strftime(0, 60, id(font1), TextAlign::BASELINE_LEFT, "%l:%M", id(time1).now());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement