It doesn’t work for me. Not sure if I need to adapt more:
- sensor:
- name: "Today's Energy Cost"
unique_id: 89fae27e-d7cb-436e-b123-7afc8706922f
# unit_of_measurement: "$"
state: "{{ '$ {:,.2f}'.format(
(states('sensor.vue_gen_2_1d') | round(2))
* (states('sensor.tou_cost') | round(2))
) | round(2) }}"
# device_class: monetary