I am trying to understand the issue here. I selected the sensor and attribute as below.
In GUI its showing this (only the percentage relevant)
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.
I am trying to understand the issue here. I selected the sensor and attribute as below.
In GUI its showing this (only the percentage relevant)
Generating this code
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
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
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.