![image](https://community-assets.home-assistant.io/original/4X/9/3/0/9301a017ddcc71ead0fad4cf06c65b40ef54f7e3.png)
Does not show my sensors made as a template. Please help me, what could be the problem?
I create my sensors like this:
template:
- sensor:
- name: "waterius_total_cold"
device_class: water
state_class: total
state: "{{ states(`sensor.waterius_kitchen_cold`)|float(0) + states(`sensor.waterius_bathroom_cold`)|float(0) }}"
tom_l
2
You are using the wrong sort of single quotes try this:
state: "{{ states('sensor.waterius_kitchen_cold')|float(0) + states('sensor.waterius_bathroom_cold')|float(0) }}"
I tried it, but I can’t see it either
tom_l
4
Go to Developer Tools → Templates.
Paste in:
{{ states('sensor.waterius_kitchen_cold') }}
{{ states('sensor.waterius_bathroom_cold') }}
What do you see in the result column to the right?
tom_l
6
Then this should work:
template:
- sensor:
- name: "waterius_total_cold"
device_class: water
state_class: total
state: "{{ states('sensor.waterius_kitchen_cold')|float(0) + states('sensor.waterius_bathroom_cold')|float(0) }}"
Where are you putting this config?
Did you restart after creating it?
What related errors do you see in the log?
In my yaml file:
yes, of course
There is no error in the logs for the specified sensor
tom_l
8
Put it in configuration.yaml
-
I put it in configuration.yaml
-
Rebooted the server
-
In the logs, he swore at the unit of measurement.
-
I corrected it
But still the in energy panel is empty (writes not detected)