esphome: name: d1-wohnzimmer-oled friendly_name: D1 Wohnzimmer-OLED esp8266: board: esp12e # Enable logging logger: # Enable Home Assistant API api: encryption: key: "hrjJ1iScuUXrNis/9dWMz0Lu0+JQdSlgnig0fI3R4eA=" ota: platform: esphome wifi: ssid: !secret wifi_ssid password: !secret wifi_password captive_portal: i2c: sda: 4 scl: 5 scan: true font: - file: fonts/Itim-Regular.ttf id: itim30 size: 30 - file: fonts/Itim-Regular.ttf id: itim25 size: 25 - file: 'fonts/materialdesignicons-webfont.ttf' id: materialdesign_icons_25 size: 32 glyphs: [ "\U000F050F", # mdi-thermometer "\U000F0F55", # mdi-home-thermometer-outline "\U000F0F54", # mdi-home-thermometer "\U000F058E", # mdi-water-percent "\U000F029A", # mdi-gauge "\U000F059B", # mdi-weather-sunset "\U000F059C", # mdi-weather-sunrise "\U000F10C2", # mdi-thermometer-high "\U000F10C3", # mdi-thermometer-low "\U000F192D", # mid-transmission-tower-import "\U000F0D9C", # mdi-solar-pannel-larg "\U000F19A5" # mdi-solar-compas ] sensor: - platform: bmp085 temperature: name: "Wohnzimmer Temperatur" id: temp address: 0x77 update_interval: 90s - platform: homeassistant id: solar_forcast_now entity_id: sensor.power_production_now 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 display: - platform: ssd1306_i2c model: "ssd1306 128X32" id: oled address: 0x3C pages: - id: page_temperatur lambda: |- //it.line(32, 0, 32, 28); //it.line(64, 0, 64, 28); //it.line(96, 0, 96, 28); it.printf(0, 0, id(materialdesign_icons_25), "\U000F050F"); it.printf(36, -2, id(itim30), "%.0f", id(temp).state); it.print(100, 2, id(itim25), "°C"); - id: page_gesammtverbrauch lambda: |- //it.line(32, 0, 32, 28); //it.line(64, 0, 64, 28); //it.line(96, 0, 96, 28); it.printf(0, 0, id(materialdesign_icons_25), "\U000F192D"); it.printf(36, -2, id(itim30), "%.0f", id(gesammtverbrauch).state); it.print(103, 2, id(itim25), "W"); - id: page_solar_power lambda: |- //it.line(32, 0, 32, 28); //it.line(64, 0, 64, 28); //it.line(96, 0, 96, 28); it.printf(0, 0, id(materialdesign_icons_25), "\U000F0D9C"); it.printf(36, -2, id(itim30), "%.0f", id(sollar_power).state); it.print(103, 2, id(itim25), "W"); - id: page_solar_forcast lambda: |- //it.line(32, 0, 32, 28); //it.line(64, 0, 64, 28); //it.line(96, 0, 96, 28); it.printf(0, 0, id(materialdesign_icons_25), "\U000F19A5"); it.printf(36, -2, id(itim30), "%.0f", id(solar_forcast_now).state); it.print(103, 2, id(itim25), "W"); interval: - interval: 30s then: - display.page.show_next: oled - component.update: oled