I am trying to do a calculation in a column in the flex-table-card.
Here is my code (below).
I am trying to show the cost for the power for running various devices. Today the cost of electricity is .288/kwh. However this changes frequently so I put the current cost in an input_number helper. I would like to change the calculation to multiply the kwh used by the input_number helper- instead of the fixed .288 value. I’ve tried multiple approaches, none of which have worked. Any suggestions?
It does seem for my use cases that using attributes in a template sensor is the best way to go. Things like multiplying the kWh by an input_number and having a total row necessitated this approach. This is still a work in progress - but here is what I have so far:
As for the booleans in quotes - I had started this by copying an example shown in a discussion group. I soon discovered that the quotes had to go - not sure why they were there in the first place.