morning all.
so i have an esp with a display, that is showing the current power usage
this info is retrieved from home assistant and coming from another esp using a pulse meter which i believe updates the value on each pulse.
is there a way to retrieve this value at a set interval?
ie every minute?
the sensor code on the display unit is as follows
- platform: homeassistant
id: elec_usage
entity_id: sensor.electricity_usage_2
internal: false
- platform: homeassistant
id: elec_cost
entity_id: sensor.dollarstodaydig
internal: false
and
display:
- platform: ssd1306_i2c
model: "SSD1306 128x64"
# reset_pin: D0
address: 0x3C
lambda: |-
it.printf(64, 0, id(my_font), TextAlign::TOP_CENTER, "Smart Display");
it.strftime(0, 20, id(my_font), TextAlign::BASELINE_LEFT, "%H:%M", id(esptime).now());
it.printf(0, 30, id(my_font), TextAlign::BASELINE_LEFT ,"power usage %.2f KW", id(elec_usage).state);
it.printf(0, 40, id(my_font), TextAlign::BASELINE_LEFT ,"power cost $%.2f", id(elec_cost).state);
it.printf(0, 50, id(my_font), TextAlign::BASELINE_LEFT ,"Battery Level %.0f", id(wemos18650oledbattery).state);
i tried adding an update interval to the first section of code but thats not valid for a home assistant sensor…
do i need to like create a dummy sensor that updates itself to the pulse meter value once a minute and use that in the display module?