I guess the OID should be okay. I get data fine when splitting up the SNMP part and the value template part.
I have also tested with the Paessler SNMP tester.
if your OID is correct and it returns 1 or 2… then this is all you need:
- platform: "snmp"
host: 192.168.1.110
baseoid: 1.3.6.1.4.1.6574.1.1.0
name: NAS system status
value_template: >
{% if value | int == 1 %}
Normal
{% else %}
Fejl
{% endif %}
Do you know how it works if I want to do the same thing for a KNX binary sensor?
I want to change the text from on/off to “New mail” and “Normal”
I tried with this but I guess it is not correct. It returns an error in the log.
- platform: knx
state_address: '7/3/6'
name: "New mail"
data_template: >-
{% if is_state | == 1 %}
New mail
{% else %}
Normal
{% endif %}