Lyr3x / Roode

A reliable smart home people counter based on VL53L1X and ESPHome
The Unlicense
149 stars 41 forks source link

Negative number for the counter #133

Closed t112013 closed 1 year ago

t112013 commented 1 year ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. More or less yes Describe the solution you'd like A clear and concise description of what you want to happen. The number to be able to be negative Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here. The issue is about having two doors, so when people are leaving throw one door it wont go under 0. I had to make another counter in HA and an automation based on the last direction of the sensor Exposing number with the In and another with out would be perfect. Another solution would be to de able to define a second door with another sensor within the network

driv3r commented 1 year ago

I was trying the Exit state change + virtual number value helper in HASS for my staircase project - it didn't work, as last entry/exit state it doesn't change when 2 people go in one direction, it would detect one Exit only. I've just changed now to having 5 being a "zero". This way I do something like: Add people counter from sensor A to people counter from sensor B and subtract 10, which gives me 0 when no one is on stairs and a positive number when there are multiple.

It feels like there should be better way of handling this xD

Lyr3x commented 1 year ago

You can build an automation in HA to do the subtraction automatically. I've tested this briefly in the past, but do not have that situation anymore. I thought about adding this as a feature directly, but imho it does not make much sense as you can build this fairly easy in HA.