mikelawrence / senseme-hacs

Haiku with SenseME fan integration for Home Assistant
MIT License
21 stars 14 forks source link

Avoid manual entry in the config flow with discovery #24

Closed bdraco closed 3 years ago

bdraco commented 3 years ago
Screen Shot 2021-02-25 at 10 29 06 PM Screen Shot 2021-02-25 at 10 29 10 PM Screen Shot 2021-02-25 at 10 29 16 PM
mikelawrence commented 3 years ago

I liked the the form providing a default of the first found device. Trying to do that with None didn't seem to work so I added another option of "IP Address". The user can select this to enter a manual IP address.

Devices will compare on IP address and Name so there is no need to keep track of IP address and Host name in the forms.

Let me know what you think.

BTW thanks for all the help! You clearly know Python and Home Assistant quite well.

bdraco commented 3 years ago

I was a bit conflicted on None since I was trying to avoid a string that wouldn't be translatable, but I think IP Address doesn't need to be translated so it seems good to me.

I'll give it a spin shortly.

bdraco commented 3 years ago

LGTM 👍

Tested and working as you describe

mikelawrence commented 3 years ago

I had not thought about translations but I don't see a better way.