Skip to content

Commit 6f0b02e

Browse files
NardolKoenkk
andauthored
fix: Home Assistant: expose group settings override (#30627)
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
1 parent 5e1b7d4 commit 6f0b02e

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

lib/util/settings.schema.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -965,6 +965,17 @@
965965
"items": {
966966
"type": "string"
967967
}
968+
},
969+
"homeassistant": {
970+
"type": ["object", "null"],
971+
"title": "Home Assistant",
972+
"properties": {
973+
"name": {
974+
"type": ["string", "null"],
975+
"title": "Home Assistant name",
976+
"description": "Name of the group in Home Assistant"
977+
}
978+
}
968979
}
969980
},
970981
"required": ["friendly_name"]

test/extensions/homeassistant.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ describe("Extension: HomeAssistant", () => {
129129

130130
it("Should discover devices and groups", async () => {
131131
settings.set(["homeassistant", "experimental_event_entities"], true);
132+
settings.set(["groups", "9", "homeassistant"], {name: "HA Discovery Group", icon: "mdi:lightbulb-group"});
132133
await resetExtension();
133134

134135
let payload;
@@ -140,12 +141,13 @@ describe("Extension: HomeAssistant", () => {
140141
command_topic: "zigbee2mqtt/ha_discovery_group/set",
141142
device: {
142143
identifiers: ["zigbee2mqtt_1221051039810110150109113116116_9"],
143-
name: "ha_discovery_group",
144+
name: "HA Discovery Group",
144145
sw_version: version,
145146
model: "Group",
146147
manufacturer: "Zigbee2MQTT",
147148
via_device: "zigbee2mqtt_bridge_0x00124b00120144ae",
148149
},
150+
icon: "mdi:lightbulb-group",
149151
max_mireds: 454,
150152
min_mireds: 250,
151153
name: null,
@@ -209,12 +211,13 @@ describe("Extension: HomeAssistant", () => {
209211
command_topic: "zigbee2mqtt/ha_discovery_group/set",
210212
device: {
211213
identifiers: ["zigbee2mqtt_1221051039810110150109113116116_9"],
212-
name: "ha_discovery_group",
214+
name: "HA Discovery Group",
213215
sw_version: version,
214216
model: "Group",
215217
manufacturer: "Zigbee2MQTT",
216218
via_device: "zigbee2mqtt_bridge_0x00124b00120144ae",
217219
},
220+
icon: "mdi:lightbulb-group",
218221
name: null,
219222
payload_off: "OFF",
220223
payload_on: "ON",

0 commit comments

Comments
 (0)