home-assistant / home-assistant/cli
CLI banner displays .local domain in HA URLs regardless of user-provided settings
- Dominant language
- Go
- Stars
- 263
- Forks
- 121
- Avg merge
- 20h 51m
- Merged PRs (30d)
- 6
Description
I noticed today that the welcome banner in the CLI includes two URLs to Home Assistant endpoints:
```
Home Assistant URL: http://homeassistant.local:8123
Observer URL: http://homeassistant.local:4357
```
These endpoints are hard-coded to use the `.local` domain, as seen here in _cmd/banner.go_:
https://github.com/home-assistant/cli/blob/8d8c11abf3103e752705d56da916dca2f1a4fcfb/cmd/banner.go#L167-L168
In my case, these URLs were not working because I had not enabled mDNS on my network.
Enabling mDNS would fix the issue on my network, but I think it would be better if HA reported the user-configured domain where possible, then gracefully fall back to `.local` if no domain is available.
Can anyone think of any downsides to this approach? Would there be any interest in merging a PR to make this change? Is this info even available to the CLI, or would I have to move upstream and change the Supervisor info API?
Contributor guide
Assessment
This issue has not been assessed yet.