@riddix/hamh 2.1.0-alpha.606 → 2.1.0-alpha.608
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/backend/cli.js
CHANGED
|
@@ -146794,6 +146794,12 @@ var init_bridge_config_schema = __esm({
|
|
|
146794
146794
|
type: "boolean",
|
|
146795
146795
|
default: false
|
|
146796
146796
|
},
|
|
146797
|
+
preferEntityRegistryName: {
|
|
146798
|
+
title: "Prefer Entity Registry Name (HA 2026.4 workaround)",
|
|
146799
|
+
description: "Use the entity registry name (or original_name) as nodeLabel instead of the composed friendly_name. Since Home Assistant 2026.4, friendly_name is prefixed with the device name, which breaks voice commands that relied on the short entity name. Resolution order: customName \u2192 registry name \u2192 registry original_name \u2192 friendly_name \u2192 entity_id. Matter has no alias concept \u2014 this only changes which single name is reported.",
|
|
146800
|
+
type: "boolean",
|
|
146801
|
+
default: false
|
|
146802
|
+
},
|
|
146797
146803
|
vacuumOnOff: {
|
|
146798
146804
|
title: "Vacuum: Include OnOff Cluster (Alexa)",
|
|
146799
146805
|
description: "Add an OnOff cluster to robot vacuum endpoints. Alexa REQUIRES this (PowerController) to show robotic vacuums in the app. Without it, Alexa commissions the device but never displays it. In Server Mode this is enabled automatically \u2014 only check this for bridge mode. WARNING: OnOff is NOT part of the Matter RVC device type specification. Enabling this may break Apple Home (shows 'Updating') and Google Home.",
|
|
@@ -168120,7 +168126,8 @@ var BasicInformationServer2 = class extends BridgedDeviceBasicInformationServer
|
|
|
168120
168126
|
const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
|
|
168121
168127
|
const device = entity.deviceRegistry;
|
|
168122
168128
|
const mapping = homeAssistant.state.mapping;
|
|
168123
|
-
const
|
|
168129
|
+
const registryName = featureFlags?.preferEntityRegistryName ? entity.registry?.name ?? entity.registry?.original_name : void 0;
|
|
168130
|
+
const nodeLabel = ellipse(32, homeAssistant.state.customName) ?? ellipse(32, registryName) ?? ellipse(32, entity.state?.attributes?.friendly_name) ?? ellipse(32, entity.entity_id);
|
|
168124
168131
|
const productNameFromNodeLabel = featureFlags?.productNameFromNodeLabel === true ? ellipse(32, sanitizeMatterString(nodeLabel ?? "")) ?? void 0 : void 0;
|
|
168125
168132
|
const serialNumberSuffix = this.env.get(BridgeDataProvider).serialNumberSuffix;
|
|
168126
168133
|
const rawSerial = ellipse(32, mapping?.customSerialNumber) ?? hash(32, entity.entity_id);
|
|
@@ -174471,14 +174478,20 @@ function getSelectOptions(entity) {
|
|
|
174471
174478
|
const attrs = entity.state.attributes;
|
|
174472
174479
|
return attrs.options ?? [];
|
|
174473
174480
|
}
|
|
174474
|
-
|
|
174475
|
-
|
|
174476
|
-
|
|
174477
|
-
|
|
174478
|
-
|
|
174479
|
-
|
|
174480
|
-
|
|
174481
|
-
})
|
|
174481
|
+
function buildSelectModeServer(action) {
|
|
174482
|
+
return ModeSelectServer2({
|
|
174483
|
+
getOptions: getSelectOptions,
|
|
174484
|
+
getCurrentOption: (entity) => entity.state.state ?? void 0,
|
|
174485
|
+
selectOption: (option) => ({
|
|
174486
|
+
action,
|
|
174487
|
+
data: { option }
|
|
174488
|
+
})
|
|
174489
|
+
});
|
|
174490
|
+
}
|
|
174491
|
+
var SelectModeServer = buildSelectModeServer("select.select_option");
|
|
174492
|
+
var InputSelectModeServer = buildSelectModeServer(
|
|
174493
|
+
"input_select.select_option"
|
|
174494
|
+
);
|
|
174482
174495
|
function buildSupportedModes(options) {
|
|
174483
174496
|
return options.map((label, index) => ({
|
|
174484
174497
|
label: label.length > 64 ? label.substring(0, 64) : label,
|
|
@@ -174492,6 +174505,12 @@ var SelectEndpointType = ModeSelectDevice.with(
|
|
|
174492
174505
|
HomeAssistantEntityBehavior,
|
|
174493
174506
|
SelectModeServer
|
|
174494
174507
|
);
|
|
174508
|
+
var InputSelectEndpointType = ModeSelectDevice.with(
|
|
174509
|
+
BasicInformationServer2,
|
|
174510
|
+
IdentifyServer2,
|
|
174511
|
+
HomeAssistantEntityBehavior,
|
|
174512
|
+
InputSelectModeServer
|
|
174513
|
+
);
|
|
174495
174514
|
function SelectDevice(homeAssistantEntity) {
|
|
174496
174515
|
const attrs = homeAssistantEntity.entity.state.attributes;
|
|
174497
174516
|
const options = attrs.options ?? [];
|
|
@@ -174517,7 +174536,7 @@ function InputSelectDevice(homeAssistantEntity) {
|
|
|
174517
174536
|
}
|
|
174518
174537
|
const currentOption = homeAssistantEntity.entity.state.state;
|
|
174519
174538
|
const currentIndex = currentOption ? options.findIndex((o) => o.toLowerCase() === currentOption.toLowerCase()) : 0;
|
|
174520
|
-
return
|
|
174539
|
+
return InputSelectEndpointType.set({
|
|
174521
174540
|
homeAssistantEntity,
|
|
174522
174541
|
modeSelect: {
|
|
174523
174542
|
description: homeAssistantEntity.customName ?? homeAssistantEntity.entity.state.attributes.friendly_name ?? "Input Select",
|