Hi @tom_l - I didn’t want to start a new topic because my query is very similar. I’m trying to setup a sensor for a cost calculation for my hot tub.
This is in my configuration.yaml (just below the default stuff) and nothing else in the file. But after a fully HA restart, the sensor doesn’t appear. I’m using docker for my instance, just because I have a NAS that’s always on, so it was easier.
Anything standout why I can’t find the sensor? Thanks.
Yes. You have a mishmash of old and new formats. You also abused the single line template format. There will be errors in your logs about both of these.
Ahhh, yes, that makes sense. I’m cobbling together stuff from all over the place to try and get it working. Your changes have made it appear now. Much appreciated! Have a great weekend
Hey, @tom_l (and anyone else reading this) - I’m not getting data through from the sensor. If I remove (states (0.17) | float) * then I get a value through. What’s the correct way to enter an integer hardcoded? The 0.17 is my cost of electricity per kw.
If I try to add a value in I get ‘unknown’. I’ve tried creating ‘helper’ with a number type - the value is correct but if I try adding that to the sensor (states ("input_number.sensort_energy_tarrif") | float) * it goes back to ‘unknown’
That’s the ticket! I was just about to ask if there’s a playground to try these things…just dawned on me as I was typing that out - dev tools -> template lets you check these things, I’ll go to town on that a lot more going forward. You’ve a been a true legend helping me with this. Thanks very much.