@riddix/hamh 2.1.0-alpha.522 → 2.1.0-alpha.524
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
|
@@ -148675,7 +148675,8 @@ function entityMappingApi(mappingStorage) {
|
|
|
148675
148675
|
customServiceAreas: body.customServiceAreas,
|
|
148676
148676
|
customFanSpeedTags: body.customFanSpeedTags,
|
|
148677
148677
|
valetudoIdentifier: body.valetudoIdentifier,
|
|
148678
|
-
coverSwapOpenClose: body.coverSwapOpenClose
|
|
148678
|
+
coverSwapOpenClose: body.coverSwapOpenClose,
|
|
148679
|
+
composedEntities: body.composedEntities
|
|
148679
148680
|
};
|
|
148680
148681
|
const config10 = await mappingStorage.setMapping(request);
|
|
148681
148682
|
res.status(200).json(config10);
|
|
@@ -168119,12 +168120,13 @@ var OnOffServerBase = class extends OnOffServer {
|
|
|
168119
168120
|
return;
|
|
168120
168121
|
}
|
|
168121
168122
|
const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
|
|
168122
|
-
const action = turnOn
|
|
168123
|
-
|
|
168124
|
-
|
|
168123
|
+
const action = turnOn ? turnOn(void 0, this.agent) : { action: "homeassistant.turn_on" };
|
|
168124
|
+
applyPatchState(this.state, { onOff: true });
|
|
168125
|
+
if (!action) {
|
|
168126
|
+
return;
|
|
168127
|
+
}
|
|
168125
168128
|
logger167.info(`[${homeAssistant.entityId}] Turning ON -> ${action.action}`);
|
|
168126
168129
|
notifyLightTurnedOn(homeAssistant.entityId);
|
|
168127
|
-
applyPatchState(this.state, { onOff: true });
|
|
168128
168130
|
optimisticOnOffState.set(homeAssistant.entityId, {
|
|
168129
168131
|
expectedOnOff: true,
|
|
168130
168132
|
timestamp: Date.now()
|
|
@@ -168141,11 +168143,12 @@ var OnOffServerBase = class extends OnOffServer {
|
|
|
168141
168143
|
return;
|
|
168142
168144
|
}
|
|
168143
168145
|
const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
|
|
168144
|
-
const action = turnOff
|
|
168145
|
-
action: "homeassistant.turn_off"
|
|
168146
|
-
};
|
|
168147
|
-
logger167.info(`[${homeAssistant.entityId}] Turning OFF -> ${action.action}`);
|
|
168146
|
+
const action = turnOff ? turnOff(void 0, this.agent) : { action: "homeassistant.turn_off" };
|
|
168148
168147
|
applyPatchState(this.state, { onOff: false });
|
|
168148
|
+
if (!action) {
|
|
168149
|
+
return;
|
|
168150
|
+
}
|
|
168151
|
+
logger167.info(`[${homeAssistant.entityId}] Turning OFF -> ${action.action}`);
|
|
168149
168152
|
optimisticOnOffState.set(homeAssistant.entityId, {
|
|
168150
168153
|
expectedOnOff: false,
|
|
168151
168154
|
timestamp: Date.now()
|
|
@@ -170014,8 +170017,15 @@ var humidityConfig3 = {
|
|
|
170014
170017
|
var ClimateHumidityMeasurementServer = HumidityMeasurementServer(humidityConfig3);
|
|
170015
170018
|
|
|
170016
170019
|
// src/matter/endpoints/legacy/climate/behaviors/climate-on-off-server.ts
|
|
170020
|
+
init_home_assistant_entity_behavior();
|
|
170017
170021
|
var ClimateOnOffServer = OnOffServer2({
|
|
170018
|
-
turnOn: () =>
|
|
170022
|
+
turnOn: (_value, agent) => {
|
|
170023
|
+
const entity = agent.get(HomeAssistantEntityBehavior).entity;
|
|
170024
|
+
if (entity.state.state !== "off") {
|
|
170025
|
+
return void 0;
|
|
170026
|
+
}
|
|
170027
|
+
return { action: "climate.turn_on" };
|
|
170028
|
+
},
|
|
170019
170029
|
turnOff: () => ({ action: "climate.turn_off" })
|
|
170020
170030
|
}).with("Lighting");
|
|
170021
170031
|
|