Synthetic Energy Monitor?

I’ve a number of thermostats (~12) I’d like to measure / approximate energy usage for the electric baseboards they control.

The thermostat report when they energize the baseboard apart from when the thermostat calls for heat, as you can see in the excepted log below.

Summing the time the state is 1 multiplied by the wattage of the baseboard should given me an approximate consumption, except I don’t seem to have the skill to create.

Anyone been successful with something similar?

2023-12-31 18:55:52.665 INFO Z-WAVE: [Node 062] Value updated: 66-0-state 0 => 1
2023-12-31 18:55:55.021 INFO Z-WAVE: [Node 062] Value updated: 66-0-state 1 => 0
2023-12-31 18:56:08.468 INFO Z-WAVE: [Node 062] Value updated: 66-0-state 0 => 1
2023-12-31 18:56:10.827 INFO Z-WAVE: [Node 062] Value updated: 66-0-state 1 => 0
2023-12-31 18:56:24.323 INFO Z-WAVE: [Node 062] Value updated: 66-0-state 0 => 1
2023-12-31 18:56:27.257 INFO Z-WAVE: [Node 062] Value updated: 66-0-state 1 => 0
2023-12-31 18:56:40.218 INFO Z-WAVE: [Node 062] Value updated: 66-0-state 0 => 1
2023-12-31 18:56:42.758 INFO Z-WAVE: [Node 062] Value updated: 66-0-state 1 => 0
2023-12-31 18:56:55.370 INFO Z-WAVE: [Node 062] Value updated: 66-0-state 0 => 1