Sian-Lee-SA / Home-Assistant-Switch-Manager

Switch manager is a centralised component to handle button pushes for your wireless switches. This includes anything passed through the event bus. The component relies on switch blueprints which is easily made to allow GUI configuration of your switches and their button pushes. This helps remove clutter from the automations.
Other
230 stars 85 forks source link

Feature request: Include PIR sensors #191

Closed rubin110 closed 10 months ago

rubin110 commented 10 months ago

Hi, this is a bit of a longshot and totally out of scope for this project, but I figure why not ask.

Switch Manager is an amazing project and has simplified a lot of fiddling around with our home Zigbee switches. My partner and I now don't deprioritize dealing with making our light switches do a little more than just turn on and off things because we're not having to parse overly rich list of fields in random HA blueprints.

It would be great to also include PIR sensors into this project, to provide a simple pick this PIR sensor from Aqara, and the events can simply be present and unoccupied. I've dug a little through the blueprints part of the documentation and from what I can gather Switch Manager can only play nice with button events via MQTT. If I'm incorrect I would appreciate some guidance on how I can catch presence events.

Thanks!

Sian-Lee-SA commented 10 months ago

Much appreciated and glad to hear! I have touched on the subject about other sensors down the bottom of https://github.com/Sian-Lee-SA/Home-Assistant-Switch-Manager/issues/18. The scope and development time is directed only for switches and there's a couple of reasons for this. First and most obvious is that the UI and features in Switch Manager would add nothing extra or make anything faster etc if it was just done as a native automation. Automation within Home Assistant is as I beleive the best place for these as they are more geared towards "automation". There are only two states for a PIR (detected, not detected) and one of the easiest to work within the Automation page. Switches on the other hand are more interactive and comes in many different functionalities which I feel a UI to easily show the user what button and action is being worked on to be this integrations core design. Also debugging would be easier in the automation page using traces etc.

Having said that, In theory, you can make your own blueprint for a sensor, it's just this repo doesn't accept devices unless they're a switch of some kind.

I'm also happy to help build a blueprint for your PIR sensor if you're inclined due to your contribution but again I still think this is best suited on the native automation page

rubin110 commented 10 months ago

Thanks for the response and I understand the project direction. I'll see if I can jump into the documentation some more over the next month. It might be fun to scrape together something.