Skip to content

ESP sensors not correctly created for attribute #464

Description

@Ascathon

I am trying to understand the issue here. I selected the sensor and attribute as below.

Image

In GUI its showing this (only the percentage relevant)

Image

Generating this code

// widget:sensor_text id:w_mruwe90ah6r8t type:sensor_text x:222 y:288 w:56 h:40 entity:binary_sensor.knmi_helden_zon value_format:"value_only_no_unit" value_font_size:28 precision:0 attribute:"sun_chance0" postfix:"%"
                {
                  char wrap_buf[512];
                  sprintf(wrap_buf, "%.0f%%", id(binary_sensor_knmi_helden_zon_sun_chance0).state);
                  print_wrapped_text(222, 288, 56, 32, id(font_roboto_400_28), color_on, TextAlign::TOP_LEFT, wrap_buf);
                }
        // ────────────────────────────────────────

But this binary sensor named binary_sensor_knmi_helden_zon_sun_chance0 is not declared (that isn't even the real sensors name).
The only things relevant to this sensor generated is a text sensor

  • platform: homeassistant
    id: binary_sensor_knmi_helden_zon_sun_chance0_txt
    entity_id: binary_sensor.knmi_helden_zon
    attribute: sun_chance0
    internal: true

And a binary sensor

  • platform: homeassistant
    id: binary_sensor_knmi_helden_zon
    entity_id: binary_sensor.knmi_helden_zon
    internal: true

The text sensor with an ID suffix _txt is never used in the generated code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions