gas_yesterday:
friendly_name: Gas Use Yesterday
icon_template: mdi:fire
unit_of_measurement: 'kWh'
value_template: "{{(state_attr('sensor.gas', 'results')[0]['consumption']+state_attr('sensor.gas', 'results')[1]['consumption']+state_attr('sensor.gas', 'results')[2]['consumption']+state_attr('sensor.gas', 'results')[3]['consumption']+state_attr('sensor.gas', 'results')[4]['consumption']+state_attr('sensor.gas', 'results')[5]['consumption']+state_attr('sensor.gas', 'results')[6]['consumption']+state_attr('sensor.gas', 'results')[7]['consumption']+state_attr('sensor.gas', 'results')[8]['consumption']+state_attr('sensor.gas', 'results')[9]['consumption']+state_attr('sensor.gas', 'results')[10]['consumption']+state_attr('sensor.gas', 'results')[11]['consumption']+state_attr('sensor.gas', 'results')[12]['consumption']+state_attr('sensor.gas', 'results')[13]['consumption']+state_attr('sensor.gas', 'results')[14]['consumption']+state_attr('sensor.gas', 'results')[15]['consumption']+state_attr('sensor.gas', 'results')[16]['consumption']+state_attr('sensor.gas', 'results')[17]['consumption']+state_attr('sensor.gas', 'results')[18]['consumption']+state_attr('sensor.gas', 'results')[19]['consumption']+state_attr('sensor.gas', 'results')[20]['consumption']+state_attr('sensor.gas', 'results')[21]['consumption']+state_attr('sensor.gas', 'results')[22]['consumption']+state_attr('sensor.gas', 'results')[23]['consumption']+state_attr('sensor.gas', 'results')[24]['consumption']+state_attr('sensor.gas', 'results')[25]['consumption']+state_attr('sensor.gas', 'results')[26]['consumption']+state_attr('sensor.gas', 'results')[27]['consumption']+state_attr('sensor.gas', 'results')[28]['consumption']+state_attr('sensor.gas', 'results')[29]['consumption']+state_attr('sensor.gas', 'results')[30]['consumption']+state_attr('sensor.gas', 'results')[31]['consumption']+state_attr('sensor.gas', 'results')[32]['consumption']+state_attr('sensor.gas', 'results')[33]['consumption']+state_attr('sensor.gas', 'results')[34]['consumption']+state_attr('sensor.gas', 'results')[35]['consumption']+state_attr('sensor.gas', 'results')[36]['consumption']+state_attr('sensor.gas', 'results')[37]['consumption']+state_attr('sensor.gas', 'results')[38]['consumption']+state_attr('sensor.gas', 'results')[39]['consumption']+state_attr('sensor.gas', 'results')[40]['consumption']+state_attr('sensor.gas', 'results')[41]['consumption']+state_attr('sensor.gas', 'results')[42]['consumption']+state_attr('sensor.gas', 'results')[43]['consumption']+state_attr('sensor.gas', 'results')[44]['consumption']+state_attr('sensor.gas', 'results')[45]['consumption']+state_attr('sensor.gas', 'results')[46]['consumption']+state_attr('sensor.gas', 'results')[47]['consumption'])|round(3)}}"
electricity_yesterday:
friendly_name: Electricity Use Yesterday
icon_template: mdi:flash
unit_of_measurement: 'kWh'
value_template: "{{(state_attr('sensor.electricity', 'results')[0]['consumption']+state_attr('sensor.electricity', 'results')[1]['consumption']+state_attr('sensor.electricity', 'results')[2]['consumption']+state_attr('sensor.electricity', 'results')[3]['consumption']+state_attr('sensor.electricity', 'results')[4]['consumption']+state_attr('sensor.electricity', 'results')[5]['consumption']+state_attr('sensor.electricity', 'results')[6]['consumption']+state_attr('sensor.electricity', 'results')[7]['consumption']+state_attr('sensor.electricity', 'results')[8]['consumption']+state_attr('sensor.electricity', 'results')[9]['consumption']+state_attr('sensor.electricity', 'results')[10]['consumption']+state_attr('sensor.electricity', 'results')[11]['consumption']+state_attr('sensor.electricity', 'results')[12]['consumption']+state_attr('sensor.electricity', 'results')[13]['consumption']+state_attr('sensor.electricity', 'results')[14]['consumption']+state_attr('sensor.electricity', 'results')[15]['consumption']+state_attr('sensor.electricity', 'results')[16]['consumption']+state_attr('sensor.electricity', 'results')[17]['consumption']+state_attr('sensor.electricity', 'results')[18]['consumption']+state_attr('sensor.electricity', 'results')[19]['consumption']+state_attr('sensor.electricity', 'results')[20]['consumption']+state_attr('sensor.electricity', 'results')[21]['consumption']+state_attr('sensor.electricity', 'results')[22]['consumption']+state_attr('sensor.electricity', 'results')[23]['consumption']+state_attr('sensor.electricity', 'results')[24]['consumption']+state_attr('sensor.electricity', 'results')[25]['consumption']+state_attr('sensor.electricity', 'results')[26]['consumption']+state_attr('sensor.electricity', 'results')[27]['consumption']+state_attr('sensor.electricity', 'results')[28]['consumption']+state_attr('sensor.electricity', 'results')[29]['consumption']+state_attr('sensor.electricity', 'results')[30]['consumption']+state_attr('sensor.electricity', 'results')[31]['consumption']+state_attr('sensor.electricity', 'results')[32]['consumption']+state_attr('sensor.electricity', 'results')[33]['consumption']+state_attr('sensor.electricity', 'results')[34]['consumption']+state_attr('sensor.electricity', 'results')[35]['consumption']+state_attr('sensor.electricity', 'results')[36]['consumption']+state_attr('sensor.electricity', 'results')[37]['consumption']+state_attr('sensor.electricity', 'results')[38]['consumption']+state_attr('sensor.electricity', 'results')[39]['consumption']+state_attr('sensor.electricity', 'results')[40]['consumption']+state_attr('sensor.electricity', 'results')[41]['consumption']+state_attr('sensor.electricity', 'results')[42]['consumption']+state_attr('sensor.electricity', 'results')[43]['consumption']+state_attr('sensor.electricity', 'results')[44]['consumption']+state_attr('sensor.electricity', 'results')[45]['consumption']+state_attr('sensor.electricity', 'results')[46]['consumption']+state_attr('sensor.electricity', 'results')[47]['consumption'])|round(3)}}"
Here’s the full code for the sensors that calculate the consumption total for you to copy and paste - should save you a bit of time!