I have about 15 Govee H60A1’s added to HA using MQTT. Each of the lights are split into 14 different entittes, one for the main light and 13 individual entities for the segments. There is no way to set all the segments to one colour via a single command.
To work around this, I’ve created light groups for a couple of them, but the process is annoying, and when i want to update names, or how I’ve got them organized, it’s a pain to go back and forth with each of the ones I’ve created, and I don’t really want to have to do it for another 10 of them.
More to the point, this is the kind of thing I find myself doing a lot, I am looking for a better way to do this, IE not using the GUI.
The entity structure is as follows:
{
"created_at": "$dateTime",
"data": {},
"disabled_by": null,
"discovery_keys": {},
"domain": "group",
"entry_id": "$confid",
"minor_version": 1,
"modified_at": "$dateTime",
"options": {
"all": false,
"entities": [
"light.front_door_segment_001",
"light.front_door_segment_002",
"light.front_door_segment_003",
"light.front_door_segment_004",
"light.front_door_segment_005",
"light.front_door_segment_006",
"light.front_door_segment_007",
"light.front_door_segment_008",
"light.front_door_segment_009",
"light.front_door_segment_010",
"light.front_door_segment_011",
"light.front_door_segment_012",
"light.front_door_segment_013"
],
"group_type": "light",
"hide_members": true,
"name": "Front Door Ring"
},
"pref_disable_new_entities": false,
"pref_disable_polling": false,
"source": "user",
"title": "Front Door Ring",
"unique_id": null,
"version": 1
}
Which looks simple enough to just find/replace the entity name and create all 15 at once and paste directly into the core.config_entries
file directly, but this seems to be discouraged by the communitiy.
Is there a better way to do this?
Is there a way to do this in general so that I can do other similar things like create a group of all rings, create a group of each segment, etc?