Help with calculating daily/monthly cost of kwh in $

I was hoping someone could help I have 3 helpers setup for my tariffs:
Super Off-Peak

They are calculating fine in the energy dashboard and switching between the 3 based on a time automation. In the energy dashboard I can set a fixed cost per tariff and the total is calculated there properly in dollars.

What I was hoping to do though is have a card that showed the daily and monthly running costs in realtime. I tried to do this with the sensor template but not to much luck.

I would assume I need to add up all 3 tariffs individually and * each by there respective kwh/rate. I wish homeassistant made the $ amount in the energy dashboard a sensor you could use elsewhere in the UI

For example ( off peak * price) + (peak * price) + (super off-peak * price)

Incase anyone else was trying to work on this. I believe I got it working with the code below:

  - sensor:
    - name: 'Monthly Energy Total'
      device_class: monetary
      unit_of_measurement: USD
      state: >
        {% set energy1 = states('sensor.juicebox_tou_off_peak') | float %}
        {% set energy2 = states('sensor.juicebox_tou_super_off_peak') | float %} 
        {{ (((energy1 / 1000) * 0.1637) | float + ((energy2 / 1000) * 0.1243)) | round(2, default=0) }}