home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.26k stars 30.24k forks source link

unique_id not a valid option for groups defined in yaml #121770

Open stiltjack opened 2 months ago

stiltjack commented 2 months ago

The problem

Not sure if this is an issue with docs or core... The docs give unique_id as an option for groups defined in yaml, but this throws an error:

Invalid config for 'group' at groups.yaml, line 7: 'unique_id' is an invalid option for 'group', check: group->all_kitchen_lights->unique_id

This makes it impossible to manage a group of mixed entities (eg light and input_boolean) in the UI - for example to assign it an area.

What version of Home Assistant Core has the issue?

2024.7.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Group

Link to integration documentation on our website

https://www.home-assistant.io/integrations/group/

Diagnostics information

No response

Example YAML snippet

all_kitchen_lights:
  name: All kitchen lights
  unique_id: ee0db1de-85e5-4303-aedb-391f28b89eec
  icon: mdi:lightbulb-group
  entities:
    - light.kitchen_1
    - light.kitchen_2
    - light.kitchen_3
    - light.cooker_1
    - light.cooker_2
    - input_boolean.counter_lights

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 2 months ago

Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (group) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `group` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign group` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


group documentation group source (message by IssueLinks)

rrooggiieerr commented 2 months ago

Using group: is the old style of YAML, and doesn't support unique_id. Use the new style of YAML instead as described in the documentation

MacDada commented 6 days ago

Well, I'm not sure if this issue can be treated as "feature request", but I'm kindly requesting this feature: please allow to assign unique_id to "old style groups".

rrooggiieerr commented 6 days ago

Since the old style groups the new stile groups and UI based groups have been introduced. So the old style groups are 2 generations behind the latest developments.

MacDada commented 6 days ago

Since the old style groups the new stile groups and UI based groups have been introduced. So the old style groups are 2 generations behind the latest developments.

Sure. "Old style groups" are behind. YET, still more powerful… Their members can be managed by services and the list of entities can be empty – both things not possible with "new style groups". "New style groups" are not a replacement for "old style groups".