Hi,
HA configuration is driving me nuts.
I’m completly lost in configuration.
What is the correct way to configure ha ?
when you search in topics you find some answers but always with yaml configuration file.
I want to add my ups to energy dashboard.
My ups is an apc it doesn’t have an output power but nominal power and load.
i try to make a sensor which would be the result of nominal power * load /100
I understood i have to make a template.
But should i go with gui and helper or with yaml ?
If yaml should i make a templates.yaml file with template: !include templates.yaml declaration in configuration.yaml
or make a sensors.yaml file with sensor: !include sensors.yaml
I don’t like the idea to have config in several places.
Whatever way i choose i also to have to deal with the strange syntax.
For example i tried with gui. I defined a sensor template as follow:
name: ups power
state template: "{{ states('sensor.ups_nominal_output_power')| float * states('sensor.ups_load')| float /100}}"
measurement unit: W
device class: power
state class: measure
and i have this error:
Sensor None has device class 'power', state class 'measurement' unit 'W' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: '"104.3"' (<class 'str'>)
i have no other field to configure. Where can i tell ha it’s a numeric value ? i thought the usage of float in state template field was meant to do that. And state class is measure it shouldn’t be a str by default.
For yaml conf i don’t know where to begin and i also see there is a legacy syntax and a new one.
It seems very complicated for such a simple operation.