Skip to content

Conversation

hanwg
Copy link
Contributor

@hanwg hanwg commented Oct 7, 2025

Proposed change

Some integrations (e.g. telegram_bot, mealie, mastodon) have actions that required config_entry_id as a parameter.
This change adds a new menu item in the integrations page to allow the user to get the value of the config_entry_id to use for actions.
A toast is also displayed when the menu item is clicked.

image

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Not required.

Additional information

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.

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

@hanwg hanwg marked this pull request as ready for review October 7, 2025 12:49
@karwosts
Copy link
Member

karwosts commented Oct 7, 2025

Can't those actions use a config entry selctor, instead of asking for the ID?

For the vast majority of integrations this seems like it would be of no value, and would just be noise for the user.

@hanwg
Copy link
Contributor Author

hanwg commented Oct 7, 2025

Yes you are right; the user can do it through the UI.
I was offering an alternate method to get the config entry id.

I understand there's a need to balance between convenience and keeping things simple/intuitive.
I'm fine if you or the team decide to close/reject this PR.

"entries": "{count} {count, plural,\n one {entry}\n other {entries}\n}",
"no_devices_or_entities": "No devices or entities",
"devices_without_subentry": "Devices that don't belong to a sub-entry",
"copy": "Copy config entry ID",
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we shorten this to "Copy entry ID"?

Most languages don't shorten "configuration" as "config" so this gets pretty long:

  • Konfigurationseintrag-ID kopieren (German)
  • Copier l'ID d'entrée de configuration (French)
  • Copiar ID de entrada de configuración (Spanish)

Copy link
Member

Choose a reason for hiding this comment

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

Please short it even more: let's just call it Copy ID

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It needs to be specific to distinguish between device id and config entry id.
I think "Copy entry ID" is fine.

@bramkragten
Copy link
Member

I think we need to think of where we want to have stuff like this, technical IDs of devices, areas, config entries, to be used in YAML etc, I think in this menu definitely is not the right place.

It could maybe go into the system options dialog.

`
: nothing}
<ha-md-menu-item @click=${this._handleCopy} graphic="icon">
Copy link
Member

Choose a reason for hiding this comment

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

Can we move this below the rename item?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, easy change

@bramkragten bramkragten enabled auto-merge (squash) October 14, 2025 10:22
@bramkragten bramkragten merged commit 36aa74e into home-assistant:dev Oct 14, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants