How to calculate the daily sum from a sensor

you should just be looking in home-assistant.log and it shouldn’t be 17gb if you’re restarting frequently because it resets every time you restart.

ok ill do a restart now

ok restart and its 85mb already lol

Ok, you have something spamming your logs, either way, you’ll have to search for the template sensor error or clean up your logs to see the template sensor error.

only found these

2023-04-20 21:40:06.950 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event state_changed[L]: entity_id=sensor.beau_wilder_feed_yesterday, old_state=None, new_state=<state sensor.beau_wilder_feed_yesterday=unknown; unit_of_measurement=mL, device_class=volume, friendly_name=Beau Wilder Feed Yesterday @ 2023-04-20T21:38:02.682581+10:00>>)
2023-04-20 21:40:06.950 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event state_changed[L]: entity_id=sensor.beau_wilder_sleep_today, old_state=None, new_state=<state sensor.beau_wilder_sleep_today=unknown; unit_of_measurement=seconds, device_class=duration, friendly_name=Beau Wilder Sleep Today @ 2023-04-20T21:38:02.673572+10:00>>)

Ok, then they are starting up fine, now you just need to add something to the feeder and see what the error is if the template is failing.

that’s telling me that your sensor.beau_wilder_sleep_today isn’t updating, so the templates won’t update. Make sure that the template is pointing to the correct entity.

im trying to find where that sensor.beau_wilder_sleep_today_2 is coming from. I seem to have this and sensor.beau_wilder_sleep_today lol

ill start again and remove the template, refresh templates

It’s not the template at that point, it’s that the template is pointing to sensor.beau_wilder_sleep_today when sensor.beau_wilder_sleep_today_2 is updating. The template will only update when sensor.beau_wilder_sleep_today updates. So either point the template at sensor.beau_wilder_sleep_today_2 or fix what’s causing sensor.beau_wilder_sleep_today_2 from being created and only have it create sensor.beau_wilder_sleep_today. It being the integration creating sensor.beau_wilder_sleep_today_2.

ok removed the _2 sensor. Just to confirm this is where i have added the code you supplied

the _2 sensor is back again. I think its related to the fact that im deleting the test entry in baby buddy, thats the only thing i can think of?

If you don’t really want to deal with it, just change the entity_id in the trigger to the _2 one.

now its gone… ffs
anyway im back to one sensor and its not updating. ill try tomorrow. Thanks for all your help!