Initial Commit
This commit is contained in:
@@ -0,0 +1,128 @@
|
||||
esphome:
|
||||
name: oled-tim
|
||||
friendly_name: OLED Tim
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
encryption:
|
||||
key: "tY/skPnkQn1sZRBYYJ4LL571z+aA1P463WvaX58ju2w="
|
||||
|
||||
ota:
|
||||
platform: esphome
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||
ap:
|
||||
ssid: "Esphome-Web-D05329"
|
||||
password: "ZqgvIQnFz4Ib"
|
||||
|
||||
captive_portal:
|
||||
|
||||
|
||||
globals:
|
||||
- id: page
|
||||
type: int
|
||||
initial_value: "1"
|
||||
|
||||
|
||||
font:
|
||||
- file: './fonts/OpenSans-Light.ttf'
|
||||
id: font1
|
||||
size: 10
|
||||
|
||||
- file: './fonts/OpenSans-Light.ttf'
|
||||
id: font2
|
||||
size: 22
|
||||
|
||||
- file: './fonts/OpenSans-Light.ttf'
|
||||
id: font3
|
||||
size: 14
|
||||
|
||||
time:
|
||||
- platform: homeassistant
|
||||
id: esptime
|
||||
timezone: Europe/Berlin
|
||||
|
||||
sensor:
|
||||
- platform: homeassistant
|
||||
id: tim_zimmer_temp
|
||||
entity_id: sensor.esphome_web_ebe170_tim_zimmer_temperatur
|
||||
internal: true
|
||||
|
||||
- platform: homeassistant
|
||||
id: tim_zimmer_hum
|
||||
entity_id: sensor.esphome_web_ebe170_tim_zimmer_luftfeuchte
|
||||
internal: true
|
||||
|
||||
|
||||
- platform: homeassistant
|
||||
id: sollar_power
|
||||
entity_id: sensor.shellyplus1pm_4855199bbb3c_switch_0_power
|
||||
internal: true
|
||||
|
||||
- platform: homeassistant
|
||||
id: gesammtverbrauch
|
||||
entity_id: sensor.gesamtverbrauch
|
||||
internal: true
|
||||
|
||||
- platform: homeassistant
|
||||
id: P1P_Precent
|
||||
entity_id: sensor.p1p_01s00c343000157_druckfortschritt
|
||||
internal: true
|
||||
|
||||
text_sensor:
|
||||
- platform: homeassistant
|
||||
id: P1P_Status
|
||||
entity_id: sensor.p1p_01s00c343000157_aktueller_arbeitsschritt
|
||||
internal: true
|
||||
|
||||
|
||||
i2c:
|
||||
sda: 4
|
||||
scl: 5
|
||||
scan: True
|
||||
|
||||
display:
|
||||
- platform: ssd1306_i2c
|
||||
id: "OLED"
|
||||
model: "SH1106 128x64"
|
||||
address: 0x3C
|
||||
pages:
|
||||
lambda: |-
|
||||
// Print time in HH:MM format
|
||||
it.strftime(0, 0, id(font2), TextAlign::TOP_LEFT, "%H:%M", id(esptime).now());
|
||||
|
||||
// Print Gesammtverbrauch (from homeassistant sensor)
|
||||
if (id(gesammtverbrauch).has_state()) {
|
||||
it.printf(0, 60, id(font3), TextAlign::BASELINE_LEFT , "%.1fW", id(gesammtverbrauch).state);
|
||||
}
|
||||
|
||||
// Print inside temperature (from homeassistant sensor)
|
||||
if (id(tim_zimmer_temp).has_state()) {
|
||||
it.printf(126, 0, id(font3), TextAlign::TOP_RIGHT , "%.1f°", id(tim_zimmer_temp).state);
|
||||
}
|
||||
|
||||
|
||||
// Print Inside Humidity (from homeassistant sensor)
|
||||
if (id(tim_zimmer_hum).has_state()) {
|
||||
it.printf(126, 32, id(font3), TextAlign::CENTER_RIGHT , "%.1f%%", id(tim_zimmer_hum).state);
|
||||
}
|
||||
|
||||
// Print Solar Power (from homeassistant sensor)
|
||||
if (id(sollar_power).has_state()) {
|
||||
it.printf(126, 60, id(font3), TextAlign::BASELINE_RIGHT , "%.1fW", id(sollar_power).state);
|
||||
}
|
||||
|
||||
// Print Print Progress (from homeassistant sensor)
|
||||
if (id(P1P_Status).state == "printing") {
|
||||
it.printf(0, 37, id(font3), TextAlign::CENTER_LEFT , "%.f%%", id(P1P_Precent).state);
|
||||
}
|
||||
Reference in New Issue
Block a user