Panel displaying battery's last charge /change dates

Hello fantastic Home Assistant community!

I’m trying to create a lovelace panel showing when my batteries were last charged / changed. This is proving much more complicated than I imagined.

I have searched high and low and found plenty of battery discussions / blueprints etc, but not yet what I want. My apologies if i haven’t looked hard enough.

I would like to have a sensor for each (battery powered) device, one calendar input (input.datetime), one input.select (to choose which sensor to update) and a button to save the selected date to the selected sensor. Here’s what id like it to look like:

So far I haven’t been able to build a system that accepts my desired set up. I have tried using template sensors and variables (from HACS hass-variables ) with automations and the homeassistant update entity service - all unsuccessfully.
Specifically I tried using an automation to:

  • set a (HACS hass-variable) variable using the service Variables+History: set_variable (did nothing)
  • set a template sensor value using the service homeassistant.update_entity (did nothing)

I also tried to set a (triggered) template sensor using a button as the trigger - this worked, but I couldn’t figure out how to make it conditional on the input.select option. i.e. to only trigger when the relevant sensor is selected.

I’m trying to avoid having a separate button and /or input.datetime for each device. I also do not want to use separate inputs to save each date, as this looks ugly and I suspect will not provide the functionality I want.

Main issues:

  1. I can’t figure out how to use the above combination to trigger / save the date to (only 1) specific template sensor.
  2. Getting the sensors to save the value (date) indefinitely, as some batteries last years…
  3. Is there a way to display the previous dates as a list rather than a graph?!