In this guide, you’ll learn how to set up an ESP32 board to display sensor data from Home Assistant and connected I²C sensors on a 20×4 LCD display. This setup is perfect for monitoring solar power production, indoor temperatures, CO₂ levels, and more — all in real-time!
Tag: esp32
Display values from Home Assistant on a display (1602A) using ESP32
I wanted to create a simple way to quickly display the current power consumption of the household and the power generation of a PV system.
Since I still had an ESP32 and a 1602A display, I created the display using the following code.

After the current power consumption, a simple bar is created using the # symbol, which roughly visualises the consumption.
Continue reading “Display values from Home Assistant on a display (1602A) using ESP32”ESPHome: Connect and Query DS18B20 to ESP32
Boot the ESP32 first only with the one_wire config and note down the hardware address from the DS18B20. Then add the second part of the yaml (see below) to monitor the DS18B20.
YAML
esphome:
name: esp-temp
friendly_name: esp-temp
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "xxxxxxxxxx"
ota:
- platform: esphome
password: "xxxxxxxxxx"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Esp-Temp Fallback Hotspot"
password: "xxxxxxxxxx"
captive_portal:
# <<<<<<<<< add thsi part to get the hardware adress from the DS18B20 >>>>>>>>>
one_wire:
- id: bus_one
platform: gpio
pin:
number: 4
mode:
input: true
pullup: true
# <<<<<<<<< add this part after the first boot >>>>>>>>>
sensor:
- platform: dallas_temp
address: 0xe200000039xxxxxx
name: "temp1"
unit_of_measurement: "°C"
icon: "mdi:thermometer"
device_class: "temperature"
state_class: "measurement"
accuracy_decimals: 2
- platform: dallas_temp
address: 0xf400000035xxxxxx
name: "temp2"
unit_of_measurement: "°C"
icon: "mdi:thermometer"
device_class: "temperature"
state_class: "measurement"
accuracy_decimals: 2
- platform: dallas_temp
address: 0x6600000034xxxxxx
name: "temp3"
unit_of_measurement: "°C"
icon: "mdi:thermometer"
device_class: "temperature"
state_class: "measurement"
accuracy_decimals: 2
- platform: dallas_temp
address: 0xf000000034xxxxxx
name: "temp4"
unit_of_measurement: "°C"
icon: "mdi:thermometer"
device_class: "temperature"
state_class: "measurement"
accuracy_decimals: 2
- platform: dallas_temp
address: 0x5100000035xxxxxx
name: "temp5"
unit_of_measurement: "°C"
icon: "mdi:thermometer"
device_class: "temperature"
state_class: "measurement"
accuracy_decimals: 2