[SOLVED] ESPHome FW update failure (gas-meter)

Hi everyone,

I am using a gas-meter based on ESPHome for more than a year now and recently (I think since 2024.7 get an error when I want to update the FW for the gas-meter:

Failed to perform the action update/install. Error compiling gas-meter-esp8266.yaml; Try again in ESPHome dashboard for more information.

Actually I don’t see what I can do in "System > Devices > ESPHome.

In the logs I see:

homeassistant.exceptions.HomeAssistantError: Error compiling gas-meter-esp8266.yaml; Try again in ESPHome dashboard for more information.

But also communication which looks ok on the current FW:

2024-08-12 14:50:44.598 DEBUG (MainThread) [aioesphomeapi.connection] gas-meter-esp8266 @ 192.168.68.82: Got message of type PingResponse:
2024-08-12 14:51:08.400 DEBUG (MainThread) [aioesphomeapi.connection] gas-meter-esp8266 @ 192.168.68.82: Got message of type SensorStateResponse: key:

I did not change anything on the .yaml config:

esphome:
  name: gas-meter-esp8266

esp8266:
  board: esp01_1m

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "wurst"

ota:
  password: "wurst"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Gas-Meter-Esp8266"
    password: "wurst"

captive_portal:

globals:
  - id: total_pulses
    type: int
    restore_value: false
    initial_value: '0'
binary_sensor:
  - platform: gpio
    id: internal_pulse_counter
    pin:
      number: GPIO5
      mode: INPUT_PULLUP
    name: "Gas-Impulszähler (ESPHome)"
    filters:
      - delayed_on: 10ms
    on_press:
      then:
        - lambda: id(total_pulses) += 1;
sensor:
  - platform: template
    name: "Gasverbrauch [m³] (ESP)"
    device_class: gas
    unit_of_measurement: "m³"
    state_class: "total_increasing"
    icon: "mdi:fire"
    accuracy_decimals: 2
    lambda: |-
      return id(total_pulses) * 0.01;
      ESP_LOGD("Gaszähler TAG", "Pulse bisher: %d", id(total_pulses));
  - platform: template
    name: "Gaszählerstand [kWh]"
    device_class: energy
    unit_of_measurement: "kWh"
    state_class: "total_increasing"
    icon: "mdi:fire"
    accuracy_decimals: 2
    lambda: |-
      return id(total_pulses) * 0.01 * 11.1;
      ESP_LOGD("Gaszähler TAG", "Pulse bisher: %d", id(total_pulses));

Any help would be greatly appreciated.

That is not the ESPHome Dashboard.

Go to Settings → Add-ons → ESPHome → Open Web UI.

Ah, sorry.
Thank you for the hint.

I see that there is some issue with the config:

Failed config

ota.unknown: [source /config/esphome/gas-meter-esp8266.yaml:16]
  
  'ota' requires a 'platform' key but it was not specified.
  password: ...

and found this:

Thank you so much @tom_l !

1 Like