schmittx / home-assistant-eero

Eero integration for Home Assistant
MIT License
122 stars 23 forks source link

Switch guest network QR code to image entity for the 2023-7 release #60

Closed JRascagneres closed 1 year ago

JRascagneres commented 1 year ago

Home Assistant 2023-7 are getting image entities. One of the examples stated is even for use in QR codes for wifi connections. Current change log:

https://rc.home-assistant.io/blog/2023/06/28/release-20237/#image-entities

schmittx commented 1 year ago

Awesome, I wasn't aware of this, thanks for the heads up. I'll definitely plan to implement it once 2023.7 is released.

schmittx commented 1 year ago

I just released 1.4.0 with support for image entities, try it out and let me know if there's any feedback.

JRascagneres commented 1 year ago

@schmittx Seems to work well but can we have it so the image shows the default image like previous when the network isn't enabled?

schmittx commented 1 year ago

Yeah, I debated that a lot actually. The new image entity doesn't display the state in the frontend so to me it seemed weird to show the logo without any description of why the QR code wasn't being shown. I suppose I could've edited the image to include some text explanation but that seemed wonky to me. But, I understand your request and that being said...

I just released 1.4.1 which adds an option to show the logo if the network is disabled, effectively restoring the old functionality. The option is under the advanced menu with scan interval, response logging, etc.; check the README for instructions on how to access if you're not familiar.

Let me know if you've got suggestions for a better solution for the long term.

JRascagneres commented 1 year ago

I'll give it a try! I think your proposal there makes sense... Having the image modified to just say something like "QR code unavailable when network disabled" or something similar, other than that I don't have a great idea.

JRascagneres commented 1 year ago

Sorry not done this yet... Am I being dumb... I have an empty tickbox image

schmittx commented 1 year ago

You need to hard refresh your browser for the text to show up.

JRascagneres commented 1 year ago

Yeah I tried that, can't get it to show up for some reason. Same on mobile... Can activate it anyway, assume that will work?

JRascagneres commented 1 year ago

Yeah I activated that checkbox and it worked. Would recommend a note on the image like you suggested such as "must enable network to show QR code"