Hi All,
I’m trying to create a sensor based on the value of another and I’m not seeing a result. Instead I’m just seeing a value of unavailable in the Developer Tools / States. Can someone please point me in the right direction.
template:
- sensor:
- name: "Solaredge Grid To House"
unit_of_measurement: "W"
state_class: 'measurement'
device_class: 'power'
state: >
{% set m_ac_power = states('sensor.solaredge_m_ac_power') %}
{% if m_ac_power < 0 %}
{{ m_ac_power | abs }}
{% else %}
0
{% endif %}
Cheers,
Paul