Hi everyone,
I want to share my project with my VPE.
The display shows the current time and the outside temperature, the temperature of the hot water and the production of the PV.
This is my first post here so I will try to upload the STL files of my case. If you can give me a hint how to do this please
edit: https://www.thingiverse.com/thing:6926739
The internal speaker is in the case and the case is not completely closed to give the speaker a chance
The yaml code for the display and the sensors:
I also added 2 sensors to show me the stt text and the tts text of the VPE to fine tune my custom sentences to get better results:
substitutions:
name: home-assistant-voice-096a1b
friendly_name: Voice1
packages:
Nabu Casa.Home Assistant Voice PE: github://esphome/home-assistant-voice-pe/home-assistant-voice.yaml
esphome:
name: ${name}
name_add_mac_suffix: false
friendly_name: ${friendly_name}
api:
encryption:
key: xxxxxxxx=
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
text_sensor:
- platform: template
name: "text-to-speech"
id: tts
- platform: template
name: "speech-to-text"
id: stt
voice_assistant:
id: va
on_stt_end:
- text_sensor.template.publish:
id: tts
state: !lambda 'return x;'
on_tts_start:
- text_sensor.template.publish:
id: stt
state: !lambda 'return x;'
time:
- platform: homeassistant
id: esptime
sensor:
- platform: homeassistant
id: inside_temperature
entity_id: sensor.lumi_lumi_weather_temperature_2
internal: true
- platform: homeassistant
id: outside_temperature
entity_id: sensor.wetter_temperature_average
internal: true
- platform: homeassistant
id: warmwasser_temperature
entity_id: sensor.warmwasser_temperatur_2
internal: true
- platform: homeassistant
id: pv_produktion
entity_id: sensor.pv_produktion_gesamt
internal: true
font:
- file: 'digital-7.ttf'
id: font_clock80
size: 80
- file: 'digital-7.ttf'
id: font_clock60
size: 60
- file: 'digital-7.ttf'
id: font_clock40
size: 40
- file: 'digital-7.ttf'
id: font_clock32
size: 32
- file: 'BebasNeue-Regular.ttf'
id: font80
size: 80
- file: 'BebasNeue-Regular.ttf'
id: font60
size: 60
- file: 'BebasNeue-Regular.ttf'
id: font50
size: 50
- file: 'BebasNeue-Regular.ttf'
id: font32
size: 32
- file: 'digital-7.ttf'
id: font3
size: 80
- file: 'BebasNeue-Regular.ttf'
id: font4
size: 60
- file: 'BebasNeue-Regular.ttf'
id: font5
size: 20
- file: 'BebasNeue-Regular.ttf'
id: font6
size: 32
image:
- file: mdi:water-thermometer-outline
id: warmwasser_icon
resize: 30x30
- file: mdi:solar-power-variant
id: pv_icon
resize: 30x30
- file: mdi:sun-thermometer-outline
id: outtemp_icon
resize: 30x30
spi:
clk_pin: GPIO40 # (SCK/CLK)
mosi_pin: GPIO41 # (SDA)
display:
- platform: ili9xxx
model: ST7735
id: my_display
dc_pin: GPIO01
cs_pin: GPIO48
reset_pin: GPIO42
invert_colors: false
rotation: 90
dimensions:
height: 160
width: 128
offset_width: 0
offset_height: 0
pages:
- id: page1
lambda: |-
// Print time in HH:MM format
it.strftime(80, 0, id(font80), TextAlign::TOP_CENTER, "%H:%M", id(esptime).now());
it.image(0, 88, id(outtemp_icon));
// Print outside temperature (from homeassistant sensor)
if (id(outside_temperature).has_state()) {
it.printf(160, 70, id(font60), TextAlign::TOP_RIGHT , "%.1f°", id(outside_temperature).state); // Celsius als Text
}
- id: page2
lambda: |-
// Print time in HH:MM format
it.strftime(80, 0, id(font80), TextAlign::TOP_CENTER, "%H:%M", id(esptime).now());
it.image(0, 88, id(warmwasser_icon));
// Print Warmwasser-Temperatur (from homeassistant sensor)
if (id(warmwasser_temperature).has_state()) {
it.printf(160, 70, id(font60), TextAlign::TOP_RIGHT , "%.1f°", id(warmwasser_temperature).state); // Celsius als Text
}
- id: page3
lambda: |-
// Print time in HH:MM format
it.strftime(80, 0, id(font80), TextAlign::TOP_CENTER, "%H:%M", id(esptime).now());
it.image(0, 88, id(pv_icon));
// Print pv_produktion (from homeassistant sensor)
if (id(pv_produktion).has_state()) {
it.printf(160, 75, id(font50), TextAlign::TOP_RIGHT , "%.0f W", id(pv_produktion).state); // Celsius als Text
}
# Define the GPIO pin for controlling the display backlight
output:
- platform: gpio
id: display_backlight_output # Ă„ndere den id-Namen fĂĽr das output
pin: GPIO02 # Ă„ndere den Pin auf den richtigen fĂĽr dein Display
# Define a switch to control the backlight
switch:
- platform: output
name: "Display Backlight"
id: display_backlight_switch # Ă„ndere den id-Namen fĂĽr den switch
output: display_backlight_output
restore_mode: ALWAYS_ON
# For example cycle through pages on a timer
interval:
- interval: 5s
then:
- display.page.show_next: my_display
- component.update: my_display