Binary Sensor type for bypass?

Hi all,

I was wondering how I should implement a bypass binary sensor for an integration. Connectivity for a the device class doesn’t seem quite right, but it’s the closest I can find.

Or, should I just create a PR and add it to HA?

What’s being bypassed. How?

Dont quite understand what you’re trying to accomplish?

I’m bypassing another binary sensor. It’s for an ADT alarm system where you can bypass the sensors on the keypad in order to arm. Disabling doesn’t seem right, neither does adding an attribute.

It’s read only, so a switch wouldn’t work.

Just dont set a device class and provide your own suitable icon. It will display on/off which is prob ok for a bypass sensor?

That was my other thought. Can you specify multiple icons (on and off) for a binary sensor entity description? I don’t think so, but I’m not sure.

Yes (if you use the old method - ie not the new icon.json).

Just set an if statement to return the on or off icon.

Ie

@property
def icon(self):
    if _state:
        return "mdi:on_icon"
    return "mdi:off_icon"

Edit: sorry just read properly - entity description. Think you can use a lamda function, or if not extend BinarySensorEntityDescription to add an icon_fn attribute and use that in your sensor class.