Hi all, I’m new to the forums so thank you in advance for your time - seems like a fantastic community.
I am working with the AlarmDecoder integration and specifically sensor.alarm_panel_display entity.
I want to adjust the output the integration feed provides from my alarm panel through the integration (which works). Basically, I want to parse and adjust the values returned. Note I am running 0.117.0 of the HA core on a Pi 4.
I’ve studied templates and have have used the developer template editor tool and also created the following entry in my configuration,yaml file:
sensor:
- platform: template
sensors:
alarm_panel_display:
friendly_name: 'Alarm Panel Display'
value_template: >-
{% if 1 %}
{{ states('sensor.alarm_panel_display') }}
{% else %}
Test
{% endif %}
The problem for me is when this template is activated in HA, it always returns unknown. Interestingly, when the template is removed from the configuraiton.yaml file, it works in the test template editor.
I’m thinking there is a self-reference or other instantiation issue where the sensor’s value isn’t available to the template. I’ve seen a few other articles about self-reference issues, but nothing in the information that suggests what I am trying to do is legal or not.
Can anyone thumbs up or down for me if a sensor self-reference as a template is doable or not?
Much appreciated.
-David