@camstack/addon-provider-homeassistant 1.2.633 → 1.2.635
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/CHANGELOG.md +12 -0
- package/dist/addon.js +83 -60
- package/dist/addon.mjs +83 -60
- package/dist/{dist-BVojc0hA.mjs → dist-CYl0u8cF.mjs} +1038 -247
- package/dist/{dist-DVkAN1CW.js → dist-C_PMvyYa.js} +1038 -247
- package/dist/ha-export/ha-export.addon.js +28 -24
- package/dist/ha-export/ha-export.addon.mjs +28 -24
- package/package.json +1 -1
|
@@ -24,7 +24,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
24
|
enumerable: true
|
|
25
25
|
}) : target, mod));
|
|
26
26
|
//#endregion
|
|
27
|
-
const require_dist = require("../dist-
|
|
27
|
+
const require_dist = require("../dist-C_PMvyYa.js");
|
|
28
28
|
let node_crypto = require("node:crypto");
|
|
29
29
|
require("node:zlib");
|
|
30
30
|
let node_fs = require("node:fs");
|
|
@@ -2190,7 +2190,7 @@ var CAP_ENTITY_MAP = {
|
|
|
2190
2190
|
*/
|
|
2191
2191
|
brightness: {
|
|
2192
2192
|
platform: "number",
|
|
2193
|
-
field: "
|
|
2193
|
+
field: "level",
|
|
2194
2194
|
unit: "%",
|
|
2195
2195
|
writable: true,
|
|
2196
2196
|
range: PERCENT_RANGE
|
|
@@ -2278,25 +2278,25 @@ var CAP_ENTITY_MAP = {
|
|
|
2278
2278
|
},
|
|
2279
2279
|
"temperature-sensor": {
|
|
2280
2280
|
platform: "sensor",
|
|
2281
|
-
field: "
|
|
2281
|
+
field: "temperature",
|
|
2282
2282
|
deviceClass: "temperature",
|
|
2283
2283
|
unit: "°C"
|
|
2284
2284
|
},
|
|
2285
2285
|
"humidity-sensor": {
|
|
2286
2286
|
platform: "sensor",
|
|
2287
|
-
field: "
|
|
2287
|
+
field: "humidity",
|
|
2288
2288
|
deviceClass: "humidity",
|
|
2289
2289
|
unit: "%"
|
|
2290
2290
|
},
|
|
2291
2291
|
"pressure-sensor": {
|
|
2292
2292
|
platform: "sensor",
|
|
2293
|
-
field: "
|
|
2293
|
+
field: "pressure",
|
|
2294
2294
|
deviceClass: "pressure",
|
|
2295
2295
|
unit: "hPa"
|
|
2296
2296
|
},
|
|
2297
2297
|
"ambient-light-sensor": {
|
|
2298
2298
|
platform: "sensor",
|
|
2299
|
-
field: "
|
|
2299
|
+
field: "illuminance",
|
|
2300
2300
|
deviceClass: "illuminance",
|
|
2301
2301
|
unit: "lx"
|
|
2302
2302
|
},
|
|
@@ -2310,13 +2310,13 @@ var CAP_ENTITY_MAP = {
|
|
|
2310
2310
|
},
|
|
2311
2311
|
battery: {
|
|
2312
2312
|
platform: "sensor",
|
|
2313
|
-
field: "
|
|
2313
|
+
field: "level",
|
|
2314
2314
|
deviceClass: "battery",
|
|
2315
2315
|
unit: "%"
|
|
2316
2316
|
},
|
|
2317
2317
|
"power-meter": {
|
|
2318
2318
|
platform: "sensor",
|
|
2319
|
-
field: "
|
|
2319
|
+
field: "power",
|
|
2320
2320
|
deviceClass: "power",
|
|
2321
2321
|
unit: "W"
|
|
2322
2322
|
},
|
|
@@ -2508,7 +2508,7 @@ var CAP_ENTITY_MAP = {
|
|
|
2508
2508
|
/** A fan has no `on` field — `percentage` IS its state, and 0 is off. */
|
|
2509
2509
|
"fan-control": {
|
|
2510
2510
|
platform: "number",
|
|
2511
|
-
field: "
|
|
2511
|
+
field: "speed",
|
|
2512
2512
|
unit: "%",
|
|
2513
2513
|
icon: "mdi:fan",
|
|
2514
2514
|
writable: true,
|
|
@@ -2687,7 +2687,7 @@ var CAP_ENTITY_MAP = {
|
|
|
2687
2687
|
},
|
|
2688
2688
|
progress: {
|
|
2689
2689
|
platform: "sensor",
|
|
2690
|
-
field: "
|
|
2690
|
+
field: "progress",
|
|
2691
2691
|
label: "Progress",
|
|
2692
2692
|
unit: "%",
|
|
2693
2693
|
enabledByDefault: false
|
|
@@ -2757,14 +2757,14 @@ var CAP_ENTITY_MAP = {
|
|
|
2757
2757
|
},
|
|
2758
2758
|
"remaining-time": {
|
|
2759
2759
|
platform: "sensor",
|
|
2760
|
-
field: "
|
|
2760
|
+
field: "remaining",
|
|
2761
2761
|
label: "Remaining time",
|
|
2762
2762
|
deviceClass: "duration",
|
|
2763
2763
|
unit: "s"
|
|
2764
2764
|
},
|
|
2765
2765
|
"delayed-start": {
|
|
2766
2766
|
platform: "sensor",
|
|
2767
|
-
field: "
|
|
2767
|
+
field: "delayedStart",
|
|
2768
2768
|
label: "Delayed start",
|
|
2769
2769
|
deviceClass: "duration",
|
|
2770
2770
|
unit: "s",
|
|
@@ -2772,7 +2772,7 @@ var CAP_ENTITY_MAP = {
|
|
|
2772
2772
|
},
|
|
2773
2773
|
progress: {
|
|
2774
2774
|
platform: "sensor",
|
|
2775
|
-
field: "
|
|
2775
|
+
field: "progress",
|
|
2776
2776
|
label: "Progress",
|
|
2777
2777
|
unit: "%",
|
|
2778
2778
|
enabledByDefault: false
|
|
@@ -2908,7 +2908,7 @@ var CAP_ENTITY_MAP = {
|
|
|
2908
2908
|
},
|
|
2909
2909
|
progress: {
|
|
2910
2910
|
platform: "sensor",
|
|
2911
|
-
field: "
|
|
2911
|
+
field: "progress",
|
|
2912
2912
|
label: "Progress",
|
|
2913
2913
|
unit: "%",
|
|
2914
2914
|
enabledByDefault: false
|
|
@@ -3023,13 +3023,13 @@ var CAP_ENTITY_MAP = {
|
|
|
3023
3023
|
extras: {
|
|
3024
3024
|
/**
|
|
3025
3025
|
* The one writable surface `setColor` has that is a single number: its
|
|
3026
|
-
* input is a discriminated union and `{ mode: 'mired',
|
|
3026
|
+
* input is a discriminated union and `{ mode: 'mired', colorTemperature }` is the
|
|
3027
3027
|
* only arm with exactly one scalar in it. `mode` itself stays read-only
|
|
3028
3028
|
* — writing it alone would be a call with no colour in it.
|
|
3029
3029
|
*/
|
|
3030
3030
|
mireds: {
|
|
3031
3031
|
platform: "number",
|
|
3032
|
-
field: "
|
|
3032
|
+
field: "colorTemperature",
|
|
3033
3033
|
label: "Colour temperature",
|
|
3034
3034
|
unit: "mired",
|
|
3035
3035
|
writable: true,
|
|
@@ -3488,13 +3488,17 @@ function controlEntitySpecs(slice, quantity) {
|
|
|
3488
3488
|
}, kindExtra];
|
|
3489
3489
|
}
|
|
3490
3490
|
var CAPS_NOT_EXPORTED = [
|
|
3491
|
+
{
|
|
3492
|
+
cap: "ir-transmitter",
|
|
3493
|
+
reason: "A pulse-train emitter with no state: it is driven by the remote that owns a command table, and a raw send has no meaningful single entity."
|
|
3494
|
+
},
|
|
3491
3495
|
{
|
|
3492
3496
|
cap: "group-status",
|
|
3493
3497
|
reason: "Bookkeeping for a helper group (D944): how many members were included, excluded, or named. The value an operator automates on is the output capability (the temperature, the motion, the watts). These counts are session-only, have no history, and would publish a second entity that never means the reading."
|
|
3494
3498
|
},
|
|
3495
3499
|
{
|
|
3496
3500
|
cap: "meter",
|
|
3497
|
-
reason: "The integral of a gauge that is not watts (D944). The total is base-unit seconds between resets; energy from watts is power-meter.
|
|
3501
|
+
reason: "The integral of a gauge that is not watts (D944). The total is base-unit seconds between resets; energy from watts is power-meter.energy. The source quantity is not on this device yet, so publishing the total as a sensor would give it no unit."
|
|
3498
3502
|
},
|
|
3499
3503
|
{
|
|
3500
3504
|
cap: "group-active",
|
|
@@ -4703,7 +4707,7 @@ async function applyCapCommand(device, command) {
|
|
|
4703
4707
|
reason: "no-provider",
|
|
4704
4708
|
capName: "brightness"
|
|
4705
4709
|
};
|
|
4706
|
-
await device.brightness.setBrightness({
|
|
4710
|
+
await device.brightness.setBrightness({ level: command.percentage });
|
|
4707
4711
|
return { ok: true };
|
|
4708
4712
|
case "cap-alarm":
|
|
4709
4713
|
if (device.alarmPanel === void 0) return {
|
|
@@ -4806,7 +4810,7 @@ async function applyCapCommand(device, command) {
|
|
|
4806
4810
|
});
|
|
4807
4811
|
case "climate-target-humidity": return call(device.climateControl, "climate-control", (climate) => climate.setTargetHumidity({ targetHumidity: command.targetHumidity }));
|
|
4808
4812
|
case "climate-swing": return call(device.climateControl, "climate-control", (climate) => command.axis === "vertical" ? climate.setSwingVertical({ on: command.on }) : climate.setSwingHorizontal({ on: command.on }));
|
|
4809
|
-
case "fan-percentage": return call(device.fanControl, "fan-control", (fan) => fan.setPercentage({
|
|
4813
|
+
case "fan-percentage": return call(device.fanControl, "fan-control", (fan) => fan.setPercentage({ speed: command.percentage }));
|
|
4810
4814
|
case "fan-preset": return call(device.fanControl, "fan-control", (fan) => fan.setPreset({ preset: command.preset }));
|
|
4811
4815
|
case "fan-oscillating": return call(device.fanControl, "fan-control", (fan) => fan.setOscillating({ oscillating: command.oscillating }));
|
|
4812
4816
|
case "fan-direction": return call(device.fanControl, "fan-control", (fan) => fan.setDirection({ direction: command.direction }));
|
|
@@ -4857,7 +4861,7 @@ async function applyCapCommand(device, command) {
|
|
|
4857
4861
|
case "media-source": return call(device.mediaPlayer, "media-player", (media) => media.selectSource({ source: command.source }));
|
|
4858
4862
|
case "color-mireds": return call(device.color, "color", (color) => color.setColor({ color: {
|
|
4859
4863
|
mode: "mired",
|
|
4860
|
-
|
|
4864
|
+
colorTemperature: command.mireds
|
|
4861
4865
|
} }));
|
|
4862
4866
|
case "script-verb": return call(device.scriptRunner, "script-runner", (script) => command.verb === "run" ? script.run({}) : script.stop({}));
|
|
4863
4867
|
case "automation-enabled": return call(device.automationControl, "automation-control", (automation) => command.enabled ? automation.enable({}) : automation.disable({}));
|
|
@@ -7029,7 +7033,7 @@ var HaExportAddon = class extends require_dist.BaseAddon {
|
|
|
7029
7033
|
if (capName === "network-link") {
|
|
7030
7034
|
const type = readString(slice, "type");
|
|
7031
7035
|
if (type === null) return;
|
|
7032
|
-
const signalPercent = readNumber(slice, "
|
|
7036
|
+
const signalPercent = readNumber(slice, "signal");
|
|
7033
7037
|
this.push(deviceId, projectNetworkLinkSlice(deviceKey, {
|
|
7034
7038
|
type,
|
|
7035
7039
|
signalPercent
|
|
@@ -7037,7 +7041,7 @@ var HaExportAddon = class extends require_dist.BaseAddon {
|
|
|
7037
7041
|
return;
|
|
7038
7042
|
}
|
|
7039
7043
|
if (capName === "battery") {
|
|
7040
|
-
const percentage = readNumber(slice, "
|
|
7044
|
+
const percentage = readNumber(slice, "level");
|
|
7041
7045
|
const charging = readString(slice, "charging");
|
|
7042
7046
|
const sleeping = slice["sleeping"];
|
|
7043
7047
|
if (percentage === null || charging === null || typeof sleeping !== "boolean") return;
|
|
@@ -7874,12 +7878,12 @@ var HaExportAddon = class extends require_dist.BaseAddon {
|
|
|
7874
7878
|
const type = readString(link, "type");
|
|
7875
7879
|
if (type !== null) values.push(...projectNetworkLinkSlice(key, {
|
|
7876
7880
|
type,
|
|
7877
|
-
signalPercent: readNumber(link, "
|
|
7881
|
+
signalPercent: readNumber(link, "signal")
|
|
7878
7882
|
}));
|
|
7879
7883
|
}
|
|
7880
7884
|
const battery = snapshot["battery"];
|
|
7881
7885
|
if (battery !== void 0) {
|
|
7882
|
-
const percentage = readNumber(battery, "
|
|
7886
|
+
const percentage = readNumber(battery, "level");
|
|
7883
7887
|
const charging = readString(battery, "charging");
|
|
7884
7888
|
const sleeping = battery["sleeping"];
|
|
7885
7889
|
if (percentage !== null && charging !== null && typeof sleeping === "boolean") {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ft as BaseAddon, Gt as array, Ht as isReadingQuantity, I as consumableFormOf, L as consumableKindOf, Lt as baseUnitOf, O as buildAddonRouteProvider, Qt as string, U as deviceExportCapability, Ut as nodePin, Xt as object, a as COCO_TO_MACRO, c as ConsumableItemSchema, d as FanDirectionSchema, en as unknown, f as HvacModeSchema, i as CAMERA_SWITCH_ORDER, l as ConsumableStatusSchema, m as PLUG_APPLIANCE_TYPES, nn as EventCategory, o as CameraSwitchIdSchema, p as MediaPlayerRepeatSchema, s as ConsumableFormSchema, st as oauthIntegrationCapability, t as AlarmArmModeSchema, v as addonRoutesCapability } from "../dist-
|
|
1
|
+
import { Ft as BaseAddon, Gt as array, Ht as isReadingQuantity, I as consumableFormOf, L as consumableKindOf, Lt as baseUnitOf, O as buildAddonRouteProvider, Qt as string, U as deviceExportCapability, Ut as nodePin, Xt as object, a as COCO_TO_MACRO, c as ConsumableItemSchema, d as FanDirectionSchema, en as unknown, f as HvacModeSchema, i as CAMERA_SWITCH_ORDER, l as ConsumableStatusSchema, m as PLUG_APPLIANCE_TYPES, nn as EventCategory, o as CameraSwitchIdSchema, p as MediaPlayerRepeatSchema, s as ConsumableFormSchema, st as oauthIntegrationCapability, t as AlarmArmModeSchema, v as addonRoutesCapability } from "../dist-CYl0u8cF.mjs";
|
|
2
2
|
import { createHmac, timingSafeEqual } from "node:crypto";
|
|
3
3
|
import "node:zlib";
|
|
4
4
|
import "node:fs";
|
|
@@ -2155,7 +2155,7 @@ var CAP_ENTITY_MAP = {
|
|
|
2155
2155
|
*/
|
|
2156
2156
|
brightness: {
|
|
2157
2157
|
platform: "number",
|
|
2158
|
-
field: "
|
|
2158
|
+
field: "level",
|
|
2159
2159
|
unit: "%",
|
|
2160
2160
|
writable: true,
|
|
2161
2161
|
range: PERCENT_RANGE
|
|
@@ -2243,25 +2243,25 @@ var CAP_ENTITY_MAP = {
|
|
|
2243
2243
|
},
|
|
2244
2244
|
"temperature-sensor": {
|
|
2245
2245
|
platform: "sensor",
|
|
2246
|
-
field: "
|
|
2246
|
+
field: "temperature",
|
|
2247
2247
|
deviceClass: "temperature",
|
|
2248
2248
|
unit: "°C"
|
|
2249
2249
|
},
|
|
2250
2250
|
"humidity-sensor": {
|
|
2251
2251
|
platform: "sensor",
|
|
2252
|
-
field: "
|
|
2252
|
+
field: "humidity",
|
|
2253
2253
|
deviceClass: "humidity",
|
|
2254
2254
|
unit: "%"
|
|
2255
2255
|
},
|
|
2256
2256
|
"pressure-sensor": {
|
|
2257
2257
|
platform: "sensor",
|
|
2258
|
-
field: "
|
|
2258
|
+
field: "pressure",
|
|
2259
2259
|
deviceClass: "pressure",
|
|
2260
2260
|
unit: "hPa"
|
|
2261
2261
|
},
|
|
2262
2262
|
"ambient-light-sensor": {
|
|
2263
2263
|
platform: "sensor",
|
|
2264
|
-
field: "
|
|
2264
|
+
field: "illuminance",
|
|
2265
2265
|
deviceClass: "illuminance",
|
|
2266
2266
|
unit: "lx"
|
|
2267
2267
|
},
|
|
@@ -2275,13 +2275,13 @@ var CAP_ENTITY_MAP = {
|
|
|
2275
2275
|
},
|
|
2276
2276
|
battery: {
|
|
2277
2277
|
platform: "sensor",
|
|
2278
|
-
field: "
|
|
2278
|
+
field: "level",
|
|
2279
2279
|
deviceClass: "battery",
|
|
2280
2280
|
unit: "%"
|
|
2281
2281
|
},
|
|
2282
2282
|
"power-meter": {
|
|
2283
2283
|
platform: "sensor",
|
|
2284
|
-
field: "
|
|
2284
|
+
field: "power",
|
|
2285
2285
|
deviceClass: "power",
|
|
2286
2286
|
unit: "W"
|
|
2287
2287
|
},
|
|
@@ -2473,7 +2473,7 @@ var CAP_ENTITY_MAP = {
|
|
|
2473
2473
|
/** A fan has no `on` field — `percentage` IS its state, and 0 is off. */
|
|
2474
2474
|
"fan-control": {
|
|
2475
2475
|
platform: "number",
|
|
2476
|
-
field: "
|
|
2476
|
+
field: "speed",
|
|
2477
2477
|
unit: "%",
|
|
2478
2478
|
icon: "mdi:fan",
|
|
2479
2479
|
writable: true,
|
|
@@ -2652,7 +2652,7 @@ var CAP_ENTITY_MAP = {
|
|
|
2652
2652
|
},
|
|
2653
2653
|
progress: {
|
|
2654
2654
|
platform: "sensor",
|
|
2655
|
-
field: "
|
|
2655
|
+
field: "progress",
|
|
2656
2656
|
label: "Progress",
|
|
2657
2657
|
unit: "%",
|
|
2658
2658
|
enabledByDefault: false
|
|
@@ -2722,14 +2722,14 @@ var CAP_ENTITY_MAP = {
|
|
|
2722
2722
|
},
|
|
2723
2723
|
"remaining-time": {
|
|
2724
2724
|
platform: "sensor",
|
|
2725
|
-
field: "
|
|
2725
|
+
field: "remaining",
|
|
2726
2726
|
label: "Remaining time",
|
|
2727
2727
|
deviceClass: "duration",
|
|
2728
2728
|
unit: "s"
|
|
2729
2729
|
},
|
|
2730
2730
|
"delayed-start": {
|
|
2731
2731
|
platform: "sensor",
|
|
2732
|
-
field: "
|
|
2732
|
+
field: "delayedStart",
|
|
2733
2733
|
label: "Delayed start",
|
|
2734
2734
|
deviceClass: "duration",
|
|
2735
2735
|
unit: "s",
|
|
@@ -2737,7 +2737,7 @@ var CAP_ENTITY_MAP = {
|
|
|
2737
2737
|
},
|
|
2738
2738
|
progress: {
|
|
2739
2739
|
platform: "sensor",
|
|
2740
|
-
field: "
|
|
2740
|
+
field: "progress",
|
|
2741
2741
|
label: "Progress",
|
|
2742
2742
|
unit: "%",
|
|
2743
2743
|
enabledByDefault: false
|
|
@@ -2873,7 +2873,7 @@ var CAP_ENTITY_MAP = {
|
|
|
2873
2873
|
},
|
|
2874
2874
|
progress: {
|
|
2875
2875
|
platform: "sensor",
|
|
2876
|
-
field: "
|
|
2876
|
+
field: "progress",
|
|
2877
2877
|
label: "Progress",
|
|
2878
2878
|
unit: "%",
|
|
2879
2879
|
enabledByDefault: false
|
|
@@ -2988,13 +2988,13 @@ var CAP_ENTITY_MAP = {
|
|
|
2988
2988
|
extras: {
|
|
2989
2989
|
/**
|
|
2990
2990
|
* The one writable surface `setColor` has that is a single number: its
|
|
2991
|
-
* input is a discriminated union and `{ mode: 'mired',
|
|
2991
|
+
* input is a discriminated union and `{ mode: 'mired', colorTemperature }` is the
|
|
2992
2992
|
* only arm with exactly one scalar in it. `mode` itself stays read-only
|
|
2993
2993
|
* — writing it alone would be a call with no colour in it.
|
|
2994
2994
|
*/
|
|
2995
2995
|
mireds: {
|
|
2996
2996
|
platform: "number",
|
|
2997
|
-
field: "
|
|
2997
|
+
field: "colorTemperature",
|
|
2998
2998
|
label: "Colour temperature",
|
|
2999
2999
|
unit: "mired",
|
|
3000
3000
|
writable: true,
|
|
@@ -3453,13 +3453,17 @@ function controlEntitySpecs(slice, quantity) {
|
|
|
3453
3453
|
}, kindExtra];
|
|
3454
3454
|
}
|
|
3455
3455
|
var CAPS_NOT_EXPORTED = [
|
|
3456
|
+
{
|
|
3457
|
+
cap: "ir-transmitter",
|
|
3458
|
+
reason: "A pulse-train emitter with no state: it is driven by the remote that owns a command table, and a raw send has no meaningful single entity."
|
|
3459
|
+
},
|
|
3456
3460
|
{
|
|
3457
3461
|
cap: "group-status",
|
|
3458
3462
|
reason: "Bookkeeping for a helper group (D944): how many members were included, excluded, or named. The value an operator automates on is the output capability (the temperature, the motion, the watts). These counts are session-only, have no history, and would publish a second entity that never means the reading."
|
|
3459
3463
|
},
|
|
3460
3464
|
{
|
|
3461
3465
|
cap: "meter",
|
|
3462
|
-
reason: "The integral of a gauge that is not watts (D944). The total is base-unit seconds between resets; energy from watts is power-meter.
|
|
3466
|
+
reason: "The integral of a gauge that is not watts (D944). The total is base-unit seconds between resets; energy from watts is power-meter.energy. The source quantity is not on this device yet, so publishing the total as a sensor would give it no unit."
|
|
3463
3467
|
},
|
|
3464
3468
|
{
|
|
3465
3469
|
cap: "group-active",
|
|
@@ -4668,7 +4672,7 @@ async function applyCapCommand(device, command) {
|
|
|
4668
4672
|
reason: "no-provider",
|
|
4669
4673
|
capName: "brightness"
|
|
4670
4674
|
};
|
|
4671
|
-
await device.brightness.setBrightness({
|
|
4675
|
+
await device.brightness.setBrightness({ level: command.percentage });
|
|
4672
4676
|
return { ok: true };
|
|
4673
4677
|
case "cap-alarm":
|
|
4674
4678
|
if (device.alarmPanel === void 0) return {
|
|
@@ -4771,7 +4775,7 @@ async function applyCapCommand(device, command) {
|
|
|
4771
4775
|
});
|
|
4772
4776
|
case "climate-target-humidity": return call(device.climateControl, "climate-control", (climate) => climate.setTargetHumidity({ targetHumidity: command.targetHumidity }));
|
|
4773
4777
|
case "climate-swing": return call(device.climateControl, "climate-control", (climate) => command.axis === "vertical" ? climate.setSwingVertical({ on: command.on }) : climate.setSwingHorizontal({ on: command.on }));
|
|
4774
|
-
case "fan-percentage": return call(device.fanControl, "fan-control", (fan) => fan.setPercentage({
|
|
4778
|
+
case "fan-percentage": return call(device.fanControl, "fan-control", (fan) => fan.setPercentage({ speed: command.percentage }));
|
|
4775
4779
|
case "fan-preset": return call(device.fanControl, "fan-control", (fan) => fan.setPreset({ preset: command.preset }));
|
|
4776
4780
|
case "fan-oscillating": return call(device.fanControl, "fan-control", (fan) => fan.setOscillating({ oscillating: command.oscillating }));
|
|
4777
4781
|
case "fan-direction": return call(device.fanControl, "fan-control", (fan) => fan.setDirection({ direction: command.direction }));
|
|
@@ -4822,7 +4826,7 @@ async function applyCapCommand(device, command) {
|
|
|
4822
4826
|
case "media-source": return call(device.mediaPlayer, "media-player", (media) => media.selectSource({ source: command.source }));
|
|
4823
4827
|
case "color-mireds": return call(device.color, "color", (color) => color.setColor({ color: {
|
|
4824
4828
|
mode: "mired",
|
|
4825
|
-
|
|
4829
|
+
colorTemperature: command.mireds
|
|
4826
4830
|
} }));
|
|
4827
4831
|
case "script-verb": return call(device.scriptRunner, "script-runner", (script) => command.verb === "run" ? script.run({}) : script.stop({}));
|
|
4828
4832
|
case "automation-enabled": return call(device.automationControl, "automation-control", (automation) => command.enabled ? automation.enable({}) : automation.disable({}));
|
|
@@ -6994,7 +6998,7 @@ var HaExportAddon = class extends BaseAddon {
|
|
|
6994
6998
|
if (capName === "network-link") {
|
|
6995
6999
|
const type = readString(slice, "type");
|
|
6996
7000
|
if (type === null) return;
|
|
6997
|
-
const signalPercent = readNumber(slice, "
|
|
7001
|
+
const signalPercent = readNumber(slice, "signal");
|
|
6998
7002
|
this.push(deviceId, projectNetworkLinkSlice(deviceKey, {
|
|
6999
7003
|
type,
|
|
7000
7004
|
signalPercent
|
|
@@ -7002,7 +7006,7 @@ var HaExportAddon = class extends BaseAddon {
|
|
|
7002
7006
|
return;
|
|
7003
7007
|
}
|
|
7004
7008
|
if (capName === "battery") {
|
|
7005
|
-
const percentage = readNumber(slice, "
|
|
7009
|
+
const percentage = readNumber(slice, "level");
|
|
7006
7010
|
const charging = readString(slice, "charging");
|
|
7007
7011
|
const sleeping = slice["sleeping"];
|
|
7008
7012
|
if (percentage === null || charging === null || typeof sleeping !== "boolean") return;
|
|
@@ -7839,12 +7843,12 @@ var HaExportAddon = class extends BaseAddon {
|
|
|
7839
7843
|
const type = readString(link, "type");
|
|
7840
7844
|
if (type !== null) values.push(...projectNetworkLinkSlice(key, {
|
|
7841
7845
|
type,
|
|
7842
|
-
signalPercent: readNumber(link, "
|
|
7846
|
+
signalPercent: readNumber(link, "signal")
|
|
7843
7847
|
}));
|
|
7844
7848
|
}
|
|
7845
7849
|
const battery = snapshot["battery"];
|
|
7846
7850
|
if (battery !== void 0) {
|
|
7847
|
-
const percentage = readNumber(battery, "
|
|
7851
|
+
const percentage = readNumber(battery, "level");
|
|
7848
7852
|
const charging = readString(battery, "charging");
|
|
7849
7853
|
const sleeping = battery["sleeping"];
|
|
7850
7854
|
if (percentage !== null && charging !== null && typeof sleeping === "boolean") {
|