Trying hard to get a subtraction value of 2 sensors into a Lovelace gauge card. I have a water heating system on solar panels and I like to know the delta T between outgoing and ingoing T.
This is what I put into it:
‘’’
type: gauge
sensor:
entity: sensor.delta_t_solar_heating
min: 0
max: 5
name: Delta T Solar Heating
‘’’
I get entity not available. Not a big surprise but what am I doing wrong here?
No we cant. The photo you have taken not only makes it difficult for us to copy and paste a reply but it does not even show the entire template.
The key you want is between z and left shift on your keyboard. You need to learn how to do this. We’re not being difficult, it really is important as the link I posted explained.
Looking at your original post, the formatting is all wrong, so that’s why it wouldnt work. However since it’s not posted as a codeblock, the formatting could be fine. No way to tell.
Looking at your other post that has a photo of the template editor, the entity: sensor.delta_t_solar_heating is entirely out of place, and doesnt have the same code as your first post. Hence it’s quite helpful to see the entirety of your code, correctly formatted, to be able to see where the issue is.
If you have all of that in Lovelace for a gauge card, that won’t work.
The sensor part needs to be defined in your configuration.yaml (or elsewhere if you have a split-up configuration or are using packages).
IE this part needs to be in you configuration (not lovelace):
Hi,
Your post was helpfull to make a subtraction between to power sensors.
I’m calculating the remain not used solar power that i’m returning to grid.
This is my code and is working: