Hi,
I am trying to move a sensor from my sensors.yaml to the template.yaml.
There was already one sensor in the template.yaml, which was working fine.
After adding the second sensor, the first one does not work anymore.
Sorry, I am always struggling with Yaml.
No friendly_name on modern format template sensors, and it’s icon not icon_template. There should be errors in the logs for this.
You can create these sensors in the UI, under Helpers. No YAML problems there…
Also, your first sensor is pointless — it’s just a copy of sensor.inverter_instant_power. States are always strings, so running it through float here does nothing.
Hi Troon,
Thanks for your help, that fixed my problem indeed.
About the first sensor, it reads my solar inverter. The inverter sleeps at night, that gave me an error on my dashboard. With this sensor, now the value is 0 at night. Or am I incorrect?
(I think i remember this only works if you done have name:, so if you do it that way, you have to search the sensor in the developer tools and rename it.)