A Binary Sensor device class that indicated Full or Empty would be great. It could be great for many things with a float switch Such as a rain barrel, overflow tank, Aquarium, a fuel tank, water tank. Overall I think it wold be useful for many things.
The glass is half full.
Really none of those things are binary.
I would like that too. Full is full, empty is emtpy. All between is “halfish”. And dont fortget to vote your own.
Then it isn’t binary, it is trinary.
So what? Does it matter?
It does. Look at all the existing binary device classes. Which should it show for not empty or full? The full or the empty icon? Are you an optimist or a pessimist?
I can think of nothing worse than an optimistic fuel gauge.
Empty or full would work for me
Right, imagine you are driving around in a car that has that type of fuel indicator. It would say full until you ran out of fuel, then it would say empty.
A real world example: I have an automatic cat feeder which has to be refilled once a day. So I would like to be able to see, whether it is empty or some other family member has already refilled it, and full/empty would fit pretty nicely.
Does this feeder fully empty itself into a bucket? Otherwise, what is the state if it’s not completely full or empty? If this feeder has a native app, what does that show?
Initially it is a dumb rotating feeder with 5 compartments to which I have added a sensor which is triggered once the feeder has made a full turn. Once it has made a full turn it means that every compartment was opened and therefore empty (our cat is very reliable in this aspect ). When the sensor is triggered, I flip an input boolean in HA and then I would like to have a binary sensor which visualizes it in a nice way on my dashboard, telling me whether it is full or empty. Sure, this is a quality of life thing sparing me a couple of steps to configure the same functionality manually, but isn’t the whole smart home thing about quality of life?
That doesn’t quite answer the question. All you have here is an inaccurate sensor. There’s still not a clear example where something is exactly either empty or full. If your feeder is in positions 2, 3 or 4, what should the state be? Full or empty? I don’t see this working. At the very least this can’t be a binary sensor.
I cannot agree with the “inaccurate sensor” argument. Otherwise we wouldn’t have open/close sensors for doors and windows, since the opening can be measured in degrees. The same applies to almost any sensor measuring something in the real world, but often it is useful to discretize the measurement to binary state. This even applies to the car fuel example which @nickrout gave, because next to a gauge you would normally have a light signalling that you should refuel at the next station.
Coming back to the feeder sensor, I would argue that If the sensors measures full turns, and this is the information I am interested in, then the sensor is adequate and accurate. I want to interpret this measurements as binary full/empty state, because I don’t need fine-grained information about positions 2, 3 or 4. In my case, similar to the fuel light, the feeder would be in a full state, unless it has made a full turn and in which case it transfers into an empty state until refilled.
I hope my point is less confusing now.
I’m not confused. I asked for clarification on your view.
Then you should refine your FR, because surely people will have different views on what’s important, e.g. to consider full as fully full, and anything but full as empty, and vice versa. The point remains: a measurement that cannot make this fine distinction isn’t an accurate sensor.
Open and closed doors/blinds are not the same. It’s pretty clear in that case that not fully closed is open, even if it’s only open by a small amount. Open is not closed. The same can’t be argued for full vs empty with a personal preference.