Reverse, invert logic 0 to 1

The SNMP integration provides a value_template option. If you wish, you can use it to invert the received value directly in the SNMP Sensor, without the need for using a Template Binary Sensor.

  - platform: snmp
    name: "LC210 OUT 1"
    host: 192.168.1.7
    baseoid: 1.3.6.1.4.1.17095.3.2.0
    value_template: "{{ iif(value | int(0) == 1, 'off', 'on') }}"
1 Like