Hi Everyone,
I started programming the nextion touch display with ESPHome. I have a little problem with the gauge component of nextion. I can write to the display gauge a value (e.g. position of the gauge needle) of a homeassisant sensor of my choice. But if that value changes, the new and (all) the old needle positions of the gauge stay on the screen.
Of course, I would like to have all old needle positions disappear and only show the newest.
Part of my ESPHome Code looks like this:
display:
- platform: nextion
id: nextiondisplay
update_interval: 5s
lambda: |-
auto date = id(sntp_time).now().strftime("%b. %d");
auto time = id(sntp_time).now();
it.set_component_text("date", date.c_str());
it.set_component_text_printf("time","%02d:%02d",time.hour,time.minute);
it.set_component_value("gauge", id(power_total).state/1000*200);
and the according home assistant value is being added like that:
sensor:
- platform: homeassistant
id: power_total
entity_id: sensor.power_total_usage_house
accuracy_decimals: 1
Does anyone have found a solution for that or can hint me in the right direction?
Thanks