Skip to content

Platform esphome does not generate unique IDs #87702

Description

@DarkWarden85

The problem

Hi,

I have the following error that keeps showing up in my logs when restarting Home Assistant:

Logger: homeassistant.components.climate
Source: helpers/entity_platform.py:540
Integration: Climate (documentation, issues)
First occurred: 12:55:49 (2 occurrences)
Last logged: 12:56:01

Platform esphome does not generate unique IDs. ID ventilation-controlclimatezehnder_comfoair_550_luxe already exists - ignoring climate.zehnder_comfoair_550

It refers to a climate entity I have set up in esphome. The strange thing is that it works absolutely fine. When looking into core.entity_registry, core.device_registry or the esphome config itself I cannot find any duplicate unique IDs. I've been having this problem since setting up the device nearly two years ago, but I simply cannot get to the bottom of this.
Is there anything else I could do in order to troubleshoot this?

What version of Home Assistant Core has the issue?

Home Assistant 2023.2.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

esphome

Link to integration documentation on our website

https://www.home-assistant.io/integrations/esphome/

Diagnostics information

config_entry-esphome-70855a0e37800ebc92cf225c483da6c7.json.txt

Example YAML snippet

# See https://github.com/wichers/esphome-comfoair for uart communication source code

esphome:
  name: ventilation-control
  platform: ESP8266
  board: nodemcuv2
  includes:
    - ventilation-control/src/comfoair.h

# Enable logging
logger:
  level: WARN #DEBUG #VERBOSE #VERY_VERBOSE
  baud_rate: 0    # Very important! Otherwise uart communication to Ventilation system gets messed up
  #hardware_uart: UART0_SWAP    # Uses TX & RX Pins on Nodemcu instead of D8 & D7
# Enable Home Assistant API
api:

ota:
  password: ***REDACTED***

wifi:
  ssid: !secret wlan_ssid
  password: !secret wlan_password
  manual_ip:
    static_ip: ***REDACTED***
    gateway:  ***REDACTED***
    subnet:   ***REDACTED***
  #use_address: ***REDACTED***

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Ventilation-Control"
    password: ***REDACTED***

captive_portal:

# ------------------------------------------------------------------------------

status_led:
  pin:
    number: D4
    inverted: True  

sensor:
- platform: wifi_signal
  name: "Ventilation WiFi Signal Sensor"
  id: "ventilation_wifi_signal_sensor"
  update_interval: 60s
- platform: uptime
  name: "Ventilation Uptime Sensor"
  id: "ventilation_uptime_sensor"
  update_interval: 60s
  on_raw_value:
    then:
      - text_sensor.template.publish:
          id: "ventilation_uptime_sensor_human"
          state: !lambda |-
            int seconds = round(id(ventilation_uptime_sensor).raw_state);
            int days = seconds / (24 * 3600);
            seconds = seconds % (24 * 3600);
            int hours = seconds / 3600;
            seconds = seconds % 3600;
            int minutes = seconds /  60;
            seconds = seconds % 60;
            return (
              (days ? String(days) + "d " : "") +
              (hours ? String(hours) + "h " : "") +
              (minutes ? String(minutes) + "m " : "") +
              (String(seconds) + "s")
            ).c_str();
            
text_sensor:
  - platform: template
    name: "Ventilation Uptime Sensor Human Readable"
    id: ventilation_uptime_sensor_human
    icon: mdi:clock-start
  - platform: version
    name: "Ventilation ESPHome Version"
    id: ventilation_esphome_version_sensor
  - platform: wifi_info
    ip_address:
      name: Ventilation ESP IP-Address
    mac_address:
      name: Ventilation ESP Mac-Address

binary_sensor:

switch:
- platform: restart
  name: "Ventilation Restart"
- platform: safe_mode
  name: "Ventilation Restart (Safe Mode)"

uart:
  id: uart_bus
  baud_rate: 9600
  rx_pin: D7
  tx_pin: D8
  
climate:
- platform: custom
  lambda: |-


  
    auto ca = new esphome::comfoair::ComfoAirComponent(id(uart_bus));
    App.register_component(ca);
    ca->outside_air_temperature = new Sensor("Comfoair Ventilation Outside Air");
    ca->outside_air_temperature->set_unit_of_measurement("°C");
    ca->outside_air_temperature->set_accuracy_decimals(1);
    App.register_sensor(ca->outside_air_temperature);
    ca->supply_air_temperature = new Sensor("Comfoair Ventilation Supply Air");
    ca->supply_air_temperature->set_unit_of_measurement("°C");
    ca->supply_air_temperature->set_accuracy_decimals(1);
    App.register_sensor(ca->supply_air_temperature);
    ca->return_air_temperature = new Sensor("Comfoair Ventilation Return Air");
    ca->return_air_temperature->set_unit_of_measurement("°C");
    ca->return_air_temperature->set_accuracy_decimals(1);
    App.register_sensor(ca->return_air_temperature);
    ca->exhaust_air_temperature = new Sensor("Comfoair Ventilation Exhaust Air");
    ca->exhaust_air_temperature->set_unit_of_measurement("°C");
    ca->exhaust_air_temperature->set_accuracy_decimals(1);
    App.register_sensor(ca->exhaust_air_temperature);
    
    ca->fan_supply_air_percentage = new Sensor("Comfoair Ventilation Fan Supply Air");
    ca->fan_supply_air_percentage->set_unit_of_measurement("%");
    App.register_sensor(ca->fan_supply_air_percentage);
    ca->fan_exhaust_air_percentage = new Sensor("Comfoair Ventilation Fan Exhaust Air");
    ca->fan_exhaust_air_percentage->set_unit_of_measurement("%");
    App.register_sensor(ca->fan_exhaust_air_percentage);
    ca->fan_speed_supply = new Sensor("Comfoair Ventilation Fan Speed Supply");
    App.register_sensor(ca->fan_speed_supply);
    ca->fan_speed_exhaust = new Sensor("Comfoair Ventilation Fan Speed Exhaust");
    App.register_sensor(ca->fan_speed_exhaust);
    
    ca->is_bypass_valve_open = new BinarySensor();
    ca->is_bypass_valve_open->set_name("Comfoair Ventilation Bypass Valve");
    App.register_binary_sensor(ca->is_bypass_valve_open);
    ca->is_preheating = new BinarySensor();
    ca->is_preheating->set_name("Comfoair Ventilation Preheating");
    App.register_binary_sensor(ca->is_preheating);
    ca->is_supply_fan_active = new BinarySensor();
    ca->is_supply_fan_active->set_name("Comfoair Ventilation Supply Fan");
    App.register_binary_sensor(ca->is_supply_fan_active);
    ca->is_filter_full = new BinarySensor();
    ca->is_filter_full->set_name("Comfoair Ventilation Filter Full");
    App.register_binary_sensor(ca->is_filter_full);
    ca->is_summer_mode = new BinarySensor();
    ca->is_summer_mode->set_name("Comfoair Ventilation Summer Mode");
    App.register_binary_sensor(ca->is_summer_mode);
    
    ca->return_air_level = new Sensor("Comfoair Ventilation Return Air Level");
    App.register_sensor(ca->return_air_level);
    ca->supply_air_level = new Sensor("Comfoair Ventilation Supply Air Level");
    App.register_sensor(ca->supply_air_level);
    
    App.register_climate(ca);
    return {ca};
    
  climates:
    - name: "Zehnder Comfoair 550 Luxe"

Anything in the logs that might be useful for us?

Logger: homeassistant.components.climate
Source: helpers/entity_platform.py:540
Integration: Climate (documentation, issues)
First occurred: 12:55:49 (2 occurrences)
Last logged: 12:56:01

Platform esphome does not generate unique IDs. ID ventilation-controlclimatezehnder_comfoair_550_luxe already exists - ignoring climate.zehnder_comfoair_550

Additional information

I am using a custom included file in order to interface with my zehnder climate control.

Metadata

Metadata

Type

No type

Fields

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions