Note: Requires ESPHome 2023.7.0 or later due to new breaking changes in ESPHome!
This is a small display that shows the current electricity consumption, together with a graph of the today's electricity price, using either NordPool or Tibber. The software pulls the data from a Home Assistant instance, so all sources must be available there.
This is a port of the previous repo PowerDisplayHomeAssistant to ESPHome. The ESPHome version allows for much more flexibility and ease of setup than the previous version, and gets its time directly from Home Assistant rather than ntp. This simplifies handling of Daylight Savings Time etc. It also allows for more fonts, as it uses Google fonts that supports non-English characters, and can be easily replaced as desired.
Note: The ESPHome version requires an ESP32 microcontroller, as the ESPHome ILI9341 library seems to require more memory than is available in a Wemos D1 mini.
The hardware consists of an ESP32 and an ILI9341 display.
ILI9341 -> ESP32
VCC -> 3.3V
GND -> GND
CS -> 13
RESET -> 33
D/C -> 14
SDI(MOSI) -> 27
SCK -> 26
LED -> 25
Copy the following files into your Home Assistant ESPHome folder, for example /homeassistant/config/esphome:
power_display.h
electrical_tower32.png
solar_energy32.png
Use the file power-display-esphome.yaml to create your ESPHome entity.
Data sources from Home Assistant are defined in power-display-esphome.yaml
It will require the HomeAssistant integration with NordPool (https://github.com/custom-components/nordpool), as well as a device that can read the current power usage from the power meter.
- Home Assistant Glow pulse counter. (https://klaasnicolaas.github.io/home-assistant-glow/)
- ESPHome HAN port reader (https://github.com/psvanstrom/esphome-p1reader)
The implementation also expects a Utility Meter entity in Home Assistant. The following is an example to put in configuration.yaml:
utility_meter:
produktion_huset_per_dag:
source: sensor.cumulative_active_export
cycle: daily
PowerDisplayESPHome creates an entity in Home Assistant that can be used to control the brightness of the display, or turn it off with a schedule etc.
STL files are available for 3D printing a casing for the display.