kevinvincent / ha-wyzesense

A Home Assistant Component to interface with the WYZE Sense hub and sensor system
369 stars 101 forks source link

Add config flow handler #111

Open mgriffin13 opened 4 years ago

mgriffin13 commented 4 years ago

Would it be possible to add a Config Flow Handler? This is the way that all integrations are going. You can keep the YAML configuration as an alternative way.

One advantage of the Config Flow is that all your wyze sensors can be viewed on the Integrations page, since they'll all be tied to the wyze integration.

I would also strongly consider automatically creating a second entity sensor.wyzesense_<mac>_battery_level for each wyze sensor. I know I could create this sensor myself using templates, but that's extra work to maintain as I add and remove more sensors, plus adding the battery_level sensor gives the integration a more polished feel. This would probably be helpful as you're thinking about getting this integration merged into HA core.

mgriffin13 commented 4 years ago

Thinking about it a little more, it seems to me that the appropriate path forward would be to update this component to a top-level integration, instead of just a binary_sensor platform. This way, you'll be in a much better position to support other types of wyzesense products, like the light bulb, lock and keypad that are coming. It would also integrate into the config flow and the integrations page much smoother.

I'm thinking of the wemo integration as an example that could be used as a model to build on.

photinus commented 4 years ago

Totally agree, It's on my list of things to work on :-)