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

Set sidebar title to location name #23779

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

sethvargo
Copy link

@sethvargo sethvargo commented Jan 17, 2025

Proposed change

Set the sidebar title to the location_name configuration value. If no name is present, it defaults back to "Home Assistant". As someone with multiple HA installations, I find this very helpful to quickly differentiate which instance I'm looking at in the UI. I've been using a HACS add-on for this, but having first-class support feels useful.

Type of change

  • New feature (thank you!)

Example configuration

N/A - this default configuration will work.

Additional information

An alternative approach I considered was to introduce a new configuration parameter for the sidebar title, but that felt unnecessary since most of the time the value will be the location_name of the HA instance.

Checklist

  • The code change is tested and works locally.

  • There is no commented out code in this PR.

  • Tests have been added to verify that the new code works.

    • ⚠️ HELP - I could not find any existing test files or test cases for the sidebar. I'm not sure how/where to write them.

If user exposed functionality or configuration variables are added/changed:

Copy link

@home-assistant home-assistant bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sethvargo

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@home-assistant
Copy link

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@home-assistant home-assistant bot marked this pull request as draft January 17, 2025 18:39
@sethvargo sethvargo marked this pull request as ready for review January 17, 2025 18:46
@karwosts
Copy link
Contributor

I believe location_name is always initialized by default for everyone as "Home". So this is going to change the sidebar for everyone.

@sethvargo
Copy link
Author

sethvargo commented Jan 17, 2025

@karwosts would it be better to:

  1. Only change the sidebar if the location name is not "" or "Home"?

  2. Add a new configuration option and plumb it through?

This sets the sidebar title to the location_name configuration value. If
no name is present, it defaults back to "Home Assistant". As someone
with multiple HomeAssistant installations, I find this very helpful to
quickly differentiate which instance I'm looking at in the UI. I've been
using a HACS add-on for this, but having first-class support feels
useful.
@sethvargo sethvargo force-pushed the sethvargo/location_name branch from 7f20bf6 to 981218f Compare January 18, 2025 15:18
@wendevlin wendevlin added the Needs UX Pull requests requiring a review from the Home Assistant design team label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed Needs UX Pull requests requiring a review from the Home Assistant design team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants