Hi,
I am trying to invert a positive energy sensor to display negative power/energy(W),
It does not seem to work when inserted in Yaml config, but when trying in dev. tools it displays fine.
In Yaml
template:
- sensor:
- name: Invertert power
unit_of_measurement: “W”
state: {{ -1 * states(‘sensor.power_production’) | float (0) }}
- name: Invertert power
Error message:
Error loading /config/configuration.yaml: invalid key: “{”-1 * states(‘sensor.power_production’) | float (0)“: None}”
in “/config/configuration.yaml”, line 332, column 0