Andrea-Fox / peopleCounter

Code for a cheap people counter based on VL53L1X sensor and ESP32/8266
The Unlicense
95 stars 27 forks source link

Use of a counter instead of a input_number #10

Closed JannickBlmndl closed 3 years ago

JannickBlmndl commented 3 years ago

https://www.home-assistant.io/integrations/counter/ A state of an input_number can be changed in the UI so that could possibly mess up the automations. Secondly, I also changed the layout of the automations a bit so it's more uniform and corresponding with the examples on the home-assistant.io website. Lastly, also as an improvement I would suggest you could get also way with just two automations using the chooser. See 'make smarter automations, not more automations' from the Home Assistant Conference 2020 https://www.youtube.com/watch?v=OIkZWF5uGxk . I'm unsure if doing that would make it more or less comprehensive as an explanation, but the chooser is really powerful in HomeAssistant.

Andrea-Fox commented 3 years ago

The use of an input number instead of a counter was intentional. It can happen that the sensor misses someone entering (or exiting) a room, so being able to modify the number of people from the UI sometimes can be useful

I will also edit the automations manually in order to match the modifications regarding the layout

The observation about the use of the chooser seems very reasonable and I will look into it in the next days. It might be a big improvement in my whole Home Assistant configuration

Thank you for all the suggestions