HI. I never did this before and googled it for a while, maybe someone could point me in the right direction with this please?
I am simply just trying to do a normal calculation to create a new sensor.
So I got this so far:
#enrgy after Smarty
template:
- sensor:
- name: “Energy_after_Smarty”
unit_of_measurement: “watt”
state: >
{% set t = states(‘sensor.shelly_em_channel_2_power’) | float %}
{% set u = states(‘sensor.myenergi_zappi_21946697_internal_load_ct1’) | float %}
{{ (t - u) }}
- name: “Energy_after_Smarty”
When I try it in the developer area it shows me the result, but I guess I do a mistake adding it to the configuration.yaml somewhere.
it says after this
{% set t = states(‘sensor.shelly_em_channel_2_power’) | float %}
missed comma between flow calculation entries
and
{% set u = states(‘sensor.myenergi_zappi_21946697_internal_load_ct1’) | float %}
bad intention of a mapping entry.
Would be very grateful for your help.
Cheers