@riddix/hamh 2.1.0-alpha.751 → 2.1.0-alpha.753
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
|
@@ -124617,6 +124617,43 @@ var init_endpoint_data = __esm({
|
|
|
124617
124617
|
}
|
|
124618
124618
|
});
|
|
124619
124619
|
|
|
124620
|
+
// ../common/dist/entity-diagnostics.js
|
|
124621
|
+
function buildEntityDiagnostics(exposed, failed, warnings) {
|
|
124622
|
+
const result = failed.map((f) => ({
|
|
124623
|
+
entityId: f.entityId,
|
|
124624
|
+
status: "failed",
|
|
124625
|
+
reason: f.reason
|
|
124626
|
+
}));
|
|
124627
|
+
const failedIds = new Set(failed.map((f) => f.entityId));
|
|
124628
|
+
const issuesByEntity = /* @__PURE__ */ new Map();
|
|
124629
|
+
for (const w of warnings) {
|
|
124630
|
+
const list3 = issuesByEntity.get(w.entityId) ?? [];
|
|
124631
|
+
list3.push({
|
|
124632
|
+
controller: w.controller,
|
|
124633
|
+
controllerLabel: w.controllerLabel,
|
|
124634
|
+
note: w.note
|
|
124635
|
+
});
|
|
124636
|
+
issuesByEntity.set(w.entityId, list3);
|
|
124637
|
+
}
|
|
124638
|
+
for (const e of exposed) {
|
|
124639
|
+
if (failedIds.has(e.entityId))
|
|
124640
|
+
continue;
|
|
124641
|
+
const issues = issuesByEntity.get(e.entityId);
|
|
124642
|
+
result.push({
|
|
124643
|
+
entityId: e.entityId,
|
|
124644
|
+
deviceTypeId: e.deviceTypeId,
|
|
124645
|
+
status: issues && issues.length > 0 ? "limited" : "ok",
|
|
124646
|
+
...issues && issues.length > 0 ? { unsupportedBy: issues } : {}
|
|
124647
|
+
});
|
|
124648
|
+
}
|
|
124649
|
+
return result;
|
|
124650
|
+
}
|
|
124651
|
+
var init_entity_diagnostics = __esm({
|
|
124652
|
+
"../common/dist/entity-diagnostics.js"() {
|
|
124653
|
+
"use strict";
|
|
124654
|
+
}
|
|
124655
|
+
});
|
|
124656
|
+
|
|
124620
124657
|
// ../common/dist/entity-mapping.js
|
|
124621
124658
|
var init_entity_mapping = __esm({
|
|
124622
124659
|
"../common/dist/entity-mapping.js"() {
|
|
@@ -125249,6 +125286,7 @@ var init_dist = __esm({
|
|
|
125249
125286
|
init_diagnostic_event();
|
|
125250
125287
|
init_domains();
|
|
125251
125288
|
init_endpoint_data();
|
|
125289
|
+
init_entity_diagnostics();
|
|
125252
125290
|
init_entity_mapping();
|
|
125253
125291
|
init_home_assistant_area_registry();
|
|
125254
125292
|
init_home_assistant_device_registry();
|
|
@@ -127081,12 +127119,18 @@ function healthApi(bridgeService, haClient, version2, startTime) {
|
|
|
127081
127119
|
const data = b.data;
|
|
127082
127120
|
const fabrics = data.commissioning?.fabrics ?? [];
|
|
127083
127121
|
const sessionInfo = b.getSessionInfo();
|
|
127122
|
+
const exposed = b.getExposedDeviceTypes();
|
|
127084
127123
|
const controllers = [
|
|
127085
127124
|
...new Set(
|
|
127086
127125
|
fabrics.map((f) => classifyController(f.rootVendorId)).filter((c) => c !== void 0)
|
|
127087
127126
|
)
|
|
127088
127127
|
];
|
|
127089
|
-
const controllerWarnings = controllers.length > 0 ? computeControllerWarnings(controllers,
|
|
127128
|
+
const controllerWarnings = controllers.length > 0 ? computeControllerWarnings(controllers, exposed) : [];
|
|
127129
|
+
const entityDiagnostics = buildEntityDiagnostics(
|
|
127130
|
+
exposed,
|
|
127131
|
+
data.failedEntities ?? [],
|
|
127132
|
+
controllerWarnings
|
|
127133
|
+
);
|
|
127090
127134
|
return {
|
|
127091
127135
|
id: data.id,
|
|
127092
127136
|
name: data.name,
|
|
@@ -127106,6 +127150,7 @@ function healthApi(bridgeService, haClient, version2, startTime) {
|
|
|
127106
127150
|
})),
|
|
127107
127151
|
failedEntityCount: data.failedEntities?.length ?? 0,
|
|
127108
127152
|
controllerWarnings,
|
|
127153
|
+
entityDiagnostics,
|
|
127109
127154
|
connectivity: {
|
|
127110
127155
|
totalSessions: sessionInfo.totalSessions,
|
|
127111
127156
|
totalSubscriptions: sessionInfo.totalSubscriptions,
|
|
@@ -151390,6 +151435,16 @@ var heatingAndCoolingDefaults = {
|
|
|
151390
151435
|
var HeatingAndCoolingFeaturedBase = ThermostatServer.with("Heating", "Cooling").set(
|
|
151391
151436
|
heatingAndCoolingDefaults
|
|
151392
151437
|
);
|
|
151438
|
+
function repairSetpointLimits(limits) {
|
|
151439
|
+
let { min, max } = limits;
|
|
151440
|
+
if (min > max) [min, max] = [max, min];
|
|
151441
|
+
return {
|
|
151442
|
+
min,
|
|
151443
|
+
max,
|
|
151444
|
+
absMin: Math.min(limits.absMin, min),
|
|
151445
|
+
absMax: Math.max(limits.absMax, max)
|
|
151446
|
+
};
|
|
151447
|
+
}
|
|
151393
151448
|
function thermostatPreInitialize(self) {
|
|
151394
151449
|
const currentLocal = self.state.localTemperature;
|
|
151395
151450
|
logger199.debug(
|
|
@@ -151402,6 +151457,16 @@ function thermostatPreInitialize(self) {
|
|
|
151402
151457
|
self.state.absMaxHeatSetpointLimit = self.state.absMaxHeatSetpointLimit ?? 5e3;
|
|
151403
151458
|
self.state.minHeatSetpointLimit = self.state.minHeatSetpointLimit ?? 0;
|
|
151404
151459
|
self.state.maxHeatSetpointLimit = self.state.maxHeatSetpointLimit ?? 5e3;
|
|
151460
|
+
const heat = repairSetpointLimits({
|
|
151461
|
+
absMin: self.state.absMinHeatSetpointLimit,
|
|
151462
|
+
min: self.state.minHeatSetpointLimit,
|
|
151463
|
+
max: self.state.maxHeatSetpointLimit,
|
|
151464
|
+
absMax: self.state.absMaxHeatSetpointLimit
|
|
151465
|
+
});
|
|
151466
|
+
self.state.absMinHeatSetpointLimit = heat.absMin;
|
|
151467
|
+
self.state.minHeatSetpointLimit = heat.min;
|
|
151468
|
+
self.state.maxHeatSetpointLimit = heat.max;
|
|
151469
|
+
self.state.absMaxHeatSetpointLimit = heat.absMax;
|
|
151405
151470
|
const currentHeating = self.state.occupiedHeatingSetpoint;
|
|
151406
151471
|
const heatingValue = typeof currentHeating === "number" && !Number.isNaN(currentHeating) ? currentHeating : 2e3;
|
|
151407
151472
|
self.state.occupiedHeatingSetpoint = heatingValue;
|
|
@@ -151411,6 +151476,16 @@ function thermostatPreInitialize(self) {
|
|
|
151411
151476
|
self.state.absMaxCoolSetpointLimit = self.state.absMaxCoolSetpointLimit ?? 5e3;
|
|
151412
151477
|
self.state.minCoolSetpointLimit = self.state.minCoolSetpointLimit ?? 0;
|
|
151413
151478
|
self.state.maxCoolSetpointLimit = self.state.maxCoolSetpointLimit ?? 5e3;
|
|
151479
|
+
const cool = repairSetpointLimits({
|
|
151480
|
+
absMin: self.state.absMinCoolSetpointLimit,
|
|
151481
|
+
min: self.state.minCoolSetpointLimit,
|
|
151482
|
+
max: self.state.maxCoolSetpointLimit,
|
|
151483
|
+
absMax: self.state.absMaxCoolSetpointLimit
|
|
151484
|
+
});
|
|
151485
|
+
self.state.absMinCoolSetpointLimit = cool.absMin;
|
|
151486
|
+
self.state.minCoolSetpointLimit = cool.min;
|
|
151487
|
+
self.state.maxCoolSetpointLimit = cool.max;
|
|
151488
|
+
self.state.absMaxCoolSetpointLimit = cool.absMax;
|
|
151414
151489
|
const currentCooling = self.state.occupiedCoolingSetpoint;
|
|
151415
151490
|
const coolingValue = typeof currentCooling === "number" && !Number.isNaN(currentCooling) ? currentCooling : 2400;
|
|
151416
151491
|
self.state.occupiedCoolingSetpoint = coolingValue;
|