I needed a display for my outdoor temperature sensor which is connected to Home Assistant.
So I built one with a ESP8266, Lolin D1 mini with official OLED shield.
It features a WIFI connected OLED-display, with capabilities to display almost anything from Home Assistant.
- LOLIN D1 Mini
- LOLIN OLED SHIELD
- 3D-printer to make the case
- Homeassitant with ESPHome (If you want to use same code as me)
You can find my print files here: https://www.prusaprinters.org/prints/29525-esp8266-wifi-display-for-home-assistant
I soldered LOLIN D1 Mini and OLED shield together with pin-headers, and squeezed the boards together as much as was possible, the distance between them became about 8mm (this is important if you want to use my stl’s for case).
I used ESPHome firmware for the D1 Mini. Below is my YAML-file.
The fonts I have used is “BebasNeue-Regular.ttf” and “arial.ttf” (can be found on google), they must be in “config/esphome/”.
The temperature sensor (home-assistant entity) I display is, “sensor.multi_sensor_8”.
i2c: sda: D2 scl: D1 scan: False font: - file: 'BebasNeue-Regular.ttf' id: font1 size: 20 - file: 'arial.ttf' id: font3 size: 20 sensor: - platform: homeassistant name: "Utomhus" unit_of_measurement: "°C" id: outside_temperature entity_id: sensor.multi_sensor_8 internal: true display: - platform: ssd1306_i2c model: "SSD1306 64x48" address: 0x3C lambda: |- it.printf(32, 0, id(font1), TextAlign::TOP_CENTER, "Utomhus"); it.printf(32, 37, id(font3), TextAlign::CENTER , "%.1f°", id(outside_temperature).state);