Hello, I have a small problem here.
Till a few days back I only had a sensor for azimuth.
Now I got a Shelly 3EM and found a way to sum up the 3 power values, which works.
After that I had an error with my Azimuth Sensor.
Now I tried to make calculations with my solar power and the summed up values for power.
I can’t see the sensor “totale_energy” and for the Sun Azimuth I get error:
Logger: homeassistant.config
Source: config.py:820
First occurred: 11:33:03 (2 occurrences)
Last logged: 11:33:03
Invalid config for [template]: [sun_azimuth] is an invalid option for [template]. Check: template->sensor->0->sun_azimuth. (See /config/configuration.yaml, line 39).
Invalid config for [template]: invalid template (TemplateSyntaxError: unexpected '}', expected ')') for dictionary value @ data['sensor'][0]['state']. Got None. (See /config/configuration.yaml, line 52).
This is the part of my configuration.yaml:
template:
- sensor:
sun_azimuth:
friendly_name: "Sun Azimuth"
unit_of_measurement: '°'
value_template: "{{ state_attr('sun.sun', 'azimuth')-3|round(0) }}"
- sensor:
name: "energy_total_shelly"
unit_of_measurement: W
state: "{{ (states('sensor.shellyem3_349454716f85_channel_a_power')|float + states('sensor.shellyem3_349454716f85_channel_b_power')|float + states('sensor.shellyem3_349454716f85_channel_c_power')|float) }}"
availability: "{{ states('sensor.shellyem3_349454716f85_channel_a_power')|is_number and states('sensor.shellyem3_349454716f85_channel_b_power')|is_number and states('sensor.shellyem3_349454716f85_channel_c_power')|is_number }}"
device_class: energy
- sensor:
name: "totale_energy"
unit_of_measurement: W
state: "{{ (states('sensor.energy_total_shelly')|float + states('sensor.shellyem_05b268_channel_1_power')|float }}"
device_class: energy
Thank you very much!
Maybe someone has any idea.