Monoprice Recessed Sensor - State 254

So I bought a couple of these when they were on sale:
https://www.monoprice.com/product?p_id=15268

Its just a rebranded version of this:
https://products.z-wavealliance.org/products/1727

access_control flip flops from 22 (on) and 23 (off), however every once in a while it changes to 254, which is not in the documentation and I figure is an unknown state.

This advice cannot be changed to binary.

Has anyone had luck with getting these to work correctly?

I have a couple working. Use alarm_level. 255 is open and 0 is closed.

I didn’t describe what exactly I’m using this for.

My automation is based on when a door is closed instead of it opening.

I tried alarm_level, but 2 of these sensors I have tried do the following:

Open = access_control 22 / alarm_level 255
Closed = access_control 23 / alarm_level 0

However when access_control changes to 254, which I believe is an error message or unknown, alarm_level changes to 0 (closed), which in my case triggers the automation.

I’ve setup an automation to update an input boolean to track the door state, but was hoping there was a cleaner way to do this.

Hard to complain for the price I paid.

Not sure about the 254 status. I did this and it works fine…

  - platform: template
    sensors:
      office_door_state:
        friendly_name: "Office Door"
        value_template: >-
           {%- if  states.sensor.office_door_alarm_level.state == '255' %}open
           {%- elif states.sensor.office_door_alarm_level.state == '0' %}closed
           {%- endif %}

I have noticed that every time I reboot/restart my HA all my door sensors seem to default to ‘closed’ (0) even if the door is open and it’s only after they go through the first physical open/close cycle that they are truly in sync with reality.

Have you experienced any reliability issues with them?
I bought a bunch of them, but have only installed one so far.
I’ve had it installed for probably 6-8 weeks now and sometimes it doesn’t trigger on close, so the sensor remains at 255 until the next open/close occurs.

The only problem I am having is that they seem to default to a ‘closed’ state on pi reboot so for doors that are normally open (like my office door) you have to cycle the door close/open to get them back in sync with reality.