Secretnamen gelijktrekken met de ESPHome-map op Home Assistant

De config staat nu op twee plekken: deze repo en
/config/esphome/smartdisplay.yaml op Home Assistant. Die laatste las de
secrets van HA, deze repo zijn eigen set — met andere waarden voor de
api key en het OTA-wachtwoord. Wie het laatst flashte won, en de ander
kwam er daarna niet meer bij.

Beide configs lezen nu dezelfde namen als /config/esphome/secrets.yaml:

  smartdisplay_api_key -> api_encryption_key
  wifi_ap_password     -> ap_password
  ota_password         -> ongewijzigd van naam, wel HA's waarde

De lokale secrets.yaml (niet in git) is een kopie van die op HA, dus
beide routes leveren exact dezelfde api key en hetzelfde OTA-wachtwoord
op. home-like.yaml en /config/esphome/smartdisplay.yaml zijn nu
byte-identiek.

buttons.yaml krijgt dezelfde omzetting. Die config valideert overigens
al niet meer sinds ESPHome 2026.6 ("Invalid offsets" op de display-
transform); dat stond los van deze wijziging en is hier niet aangeraakt.

Ook opgeruimd: de header verwees nog naar achtergrondplaatjes, die sinds
de gradient niet meer bestaan. Het MDI-font is de enige asset die de
config nog nodig heeft.

Geverifieerd na het gelijktrekken: OTA vanuit de repo werkt, OTA met
HA's credentials werkt, en de ESPHome-integratie in HA bleef verbonden.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Max Gramser
2026-09-01 13:34:02 +02:00
parent cf211fb255
commit 37e653f102
2 changed files with 16 additions and 8 deletions
+14 -6
View File
@@ -23,9 +23,8 @@
# 1) Edit the TILE1..TILE6 blocks below.
# 2) If you change icons, update the FONT GLYPHS block in the substitutions below.
# Each glyph must appear exactly once — same icon on multiple tiles is fine, just list it once.
# 3) Provide background images (see ORIENTATION section for which file each preset uses):
# - images/smartdisplay_background.png (0° and 180°)
# - images/smartdisplay_background_90.png (90° and 270°)
# 3) The background is a gradient (BG_TOP_COLOR / BG_BOTTOM_COLOR), not an image.
# The only asset this config needs is fonts/materialdesignicons-webfont.ttf.
#
# Tile configuration model
# - TILE*_TYPE defines the entity kind: light | fan | switch | scene | script | cover
@@ -43,8 +42,17 @@
# - In auto mode, values and long-press behavior are derived from TILE*_TYPE:
# light -> brightness, fan -> percentage/preset, scene/script -> text
#
# Secrets
# This config is kept byte-identical in two places:
# - this repository (flash with `esphome upload home-like.yaml`)
# - /config/esphome/smartdisplay.yaml on Home Assistant (flash from the
# ESPHome dashboard)
# Both read the same secret names, and the repo's secrets.yaml is a copy of the
# one in /config/esphome/. That way either route produces the same api key and
# OTA password, so the two never fight over the device.
#
# What you must adapt before flashing
# 1) Secrets: api.encryption.key, ota.password, WiFi credentials (prefer secrets.yaml)
# 1) Secrets: api_encryption_key, ota_password, WiFi credentials (see secrets.yaml)
# 2) Pins, touch calibration and transform if your CYD variant differs
# 3) TILE*_ENTITY / TILE*_STATE_ENTITY: Home Assistant entity IDs you want to control/mirror
# 4) Orientation + touch calibration:
@@ -700,7 +708,7 @@ logger:
# Credentials are loaded from secrets.yaml — copy secrets.yaml.example to secrets.yaml and fill in your values.
api:
encryption:
key: !secret smartdisplay_api_key
key: !secret api_encryption_key
ota:
- platform: esphome
@@ -711,7 +719,7 @@ wifi:
password: !secret wifi_password
ap:
ssid: "Smartdisplay Fallback Hotspot"
password: !secret wifi_ap_password
password: !secret ap_password
captive_portal: