Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable url setting in order to add Visit button in HA UI #499

Merged
merged 1 commit into from
Jun 29, 2023

Conversation

fthiery
Copy link
Contributor

@fthiery fthiery commented Jun 28, 2023

This PR aims at adding the "Visit" button when using the hassio plugin by defining the frontend.url option with bashio's ingress_entry function.

Capture d’écran du 2023-06-29 00-22-45

@fthiery
Copy link
Contributor Author

fthiery commented Jun 28, 2023

I was able to test how HA reacts to having a relative configuration_url by editing the .storage/core.device_registry and then restarting HA:

"configuration_url": "/api/hassio_ingress/XXXXXXXXXX/#/device/0x70ac08fffe87636c/info",

The "Visit" link is automatically expanded from the base URL of the current page, and the new page opens as expected !

So while i think this works, i would love it if someone could explain how to test this end-to-end.

@Koenkk Koenkk merged commit d2f10c1 into zigbee2mqtt:master Jun 29, 2023
@Koenkk
Copy link
Contributor

Koenkk commented Jun 29, 2023

Looks good, thanks!

@Koenkk
Copy link
Contributor

Koenkk commented Jul 1, 2023

Reverted because this broke then addon (Koenkk/zigbee2mqtt#18170)

@fthiery
Copy link
Contributor Author

fthiery commented Jul 1, 2023

Really sorry about that, I will open a ticket on HA to reconsider allowing relative urls. How could I have tested this change end-to-end ? How about pushing the docker image for each PR with the PR slug as tag ? That way I would have been able to test it...

@Koenkk
Copy link
Contributor

Koenkk commented Jul 2, 2023

@fthiery
Copy link
Contributor Author

fthiery commented Jul 2, 2023

See https://developers.home-assistant.io/docs/add-ons/testing

Thanks, but is there a way to add a dummy devices the Z2M test environment, or do i have to buy dedicated hardware to test ?

@Koenkk
Copy link
Contributor

Koenkk commented Jul 4, 2023

@fthiery you will need 2 coordinators to start the second instance, devices not, you can manually edit data/database.db and add entries from your prod setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants