SNMP sensors as door device

I have a SNMP device, setup as a sensor: It returns “1” or “0” if my door is open or closed. I would like for this device to be setup as a Door in HA devices, for UI and for Alarm reasons. I have tried many ways I see in this forum, but none seem to work.

  • I tried setting the device up as a binary_snesor: (in configuration.yaml) and that doesn’t work.
  • I tried config > customizations, but since it is senser: not a binary_sensr: then “door” is not a option.
  • I tried using a Template, but I can’t find how to do that in this situation.

I am using a daenetIP2 v2 to replace my old home alarm. I believe this device will be perfect if I can get past this problem. Thank you, very much, for any help.

I’d use a template binary sensor that reads the states from your SNMP and translates it to a binary sensor.

Something like:

binary_sensor:
  - platform: template
    sensors:
      door_xy:
        friendly_name: "Door xy"
        device_class : door
        value_template: >
          {{ is_state('sensor.your_snmp_sensor', 1) }}

This will give you binary_sensor.door_xy, which will be ‘on’ when the SNMP sensor shows 1.