Binary sensor states

I’m working on adding some more unit tests for the SPC binary sensor component (use your alarm system components as sensors in HA) and found that some of the existing code currently doesn’t work. The reason is that the binary sensor is hard-coded to only support on or off states, which sounds reasonable, but the SPC system can also report that there is a problem with the sensor or that it has been temporarily taken offline which would map to e.g. STATE_UNAVAILABLE, STATE_PROBLEM or STATE_UNKNOWN.

Wouldn’t it be nice if a binary sensor could be shown as offline or indicate that action is needed before being able to show a valid value again? Any good reasoning behind the current implementation?

There is def available(self) for the availability. Adding other states to a binary sensor wouldn’t make any sense as they are are binary.