esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
290 stars 34 forks source link

Problem with non-english sensor entities name #2407

Open VladNord opened 2 years ago

VladNord commented 2 years ago

The problem

Hello! If I use non-english two-word entity sensor names at esphome, where first word is matches the name of the space the device is in, I get an interesting effect of conglutination sensor data into one object, Here is example, dht11 sensor

sensor:
  - platform: dht
    model: DHT11
    pin: GPIO3
    temperature:
      name: "Балкон Температура"
    humidity:
      name: "Балкон Влажность"
    update_interval: 60s

In home assistant i get the following

Снимок экрана 2021-09-11 в 00 19 23

Temperature and humidity on one graph :)

and get the following error in the log

Platform esphome does not generate unique IDs.

if I change the space, rename item into two-word English or one word non-english its working like a charm

image

Same situation with Sonoff pow r2 sensor.

Thanks for help!

Which version of ESPHome has the issue?

2021.8.2

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

2021.9.5

What platform are you using?

ESP8266

Board

2021.9.5

Component causing the issue

dht, cse7766

Example YAML snippet

esphome:
  name: balkon-podsvetka
  platform: ESP8266
  board: esp8285

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:
  password: "704e26531bbfcf2333e403466c27e01e"

wifi:
  ssid: ***
  password: ***

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Balkon-Podsvetka"
    password: "RnzNHElDrE8Q"

captive_portal:

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO0
      mode: INPUT_PULLUP
      inverted: true
    name: "Sonoff Basic Button"
    internal: true
    on_press:
      then:
      - light.toggle: ambient_balkon

output:
  - platform: gpio
    pin: GPIO12
    id: relay_1

light:
  - platform: binary
    name: "Балкон Подсветка"
    output: relay_1
    id: ambient_balkon

sensor:
  - platform: dht
    model: DHT11
    pin: GPIO3
    temperature:
      name: "Балкон Температура"
    humidity:
      name: "Балкон Влажность"
    update_interval: 60s

status_led:
  pin:
    number: GPIO13
    inverted: yes

Anything in the logs that might be useful for us?

Platform esphome does not generate unique IDs

Additional information

No response

probot-esphome[bot] commented 2 years ago

Hey there @ottowinter, mind taking a look at this issue as it has been labeled with an integration (api) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

oxan commented 2 years ago

This happens because the object_id is calculated based on the name, and it only allows a subset of ASCII characters. I expect it's unlikely that ESPHome will gain Unicode support anytime soon, if only because of space and memory constraints.

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.