@camstack/addon-provider-homeassistant 1.2.633 → 1.2.634
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 +6 -0
- package/dist/addon.js +83 -60
- package/dist/addon.mjs +83 -60
- package/dist/{dist-BVojc0hA.mjs → dist-6sCUdAUD.mjs} +841 -237
- package/dist/{dist-DVkAN1CW.js → dist-DSRitvmZ.js} +841 -237
- package/dist/ha-export/ha-export.addon.js +24 -24
- package/dist/ha-export/ha-export.addon.mjs +24 -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-DSRitvmZ.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,
|
|
@@ -3494,7 +3494,7 @@ var CAPS_NOT_EXPORTED = [
|
|
|
3494
3494
|
},
|
|
3495
3495
|
{
|
|
3496
3496
|
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.
|
|
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.energy. The source quantity is not on this device yet, so publishing the total as a sensor would give it no unit."
|
|
3498
3498
|
},
|
|
3499
3499
|
{
|
|
3500
3500
|
cap: "group-active",
|
|
@@ -4703,7 +4703,7 @@ async function applyCapCommand(device, command) {
|
|
|
4703
4703
|
reason: "no-provider",
|
|
4704
4704
|
capName: "brightness"
|
|
4705
4705
|
};
|
|
4706
|
-
await device.brightness.setBrightness({
|
|
4706
|
+
await device.brightness.setBrightness({ level: command.percentage });
|
|
4707
4707
|
return { ok: true };
|
|
4708
4708
|
case "cap-alarm":
|
|
4709
4709
|
if (device.alarmPanel === void 0) return {
|
|
@@ -4806,7 +4806,7 @@ async function applyCapCommand(device, command) {
|
|
|
4806
4806
|
});
|
|
4807
4807
|
case "climate-target-humidity": return call(device.climateControl, "climate-control", (climate) => climate.setTargetHumidity({ targetHumidity: command.targetHumidity }));
|
|
4808
4808
|
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({
|
|
4809
|
+
case "fan-percentage": return call(device.fanControl, "fan-control", (fan) => fan.setPercentage({ speed: command.percentage }));
|
|
4810
4810
|
case "fan-preset": return call(device.fanControl, "fan-control", (fan) => fan.setPreset({ preset: command.preset }));
|
|
4811
4811
|
case "fan-oscillating": return call(device.fanControl, "fan-control", (fan) => fan.setOscillating({ oscillating: command.oscillating }));
|
|
4812
4812
|
case "fan-direction": return call(device.fanControl, "fan-control", (fan) => fan.setDirection({ direction: command.direction }));
|
|
@@ -4857,7 +4857,7 @@ async function applyCapCommand(device, command) {
|
|
|
4857
4857
|
case "media-source": return call(device.mediaPlayer, "media-player", (media) => media.selectSource({ source: command.source }));
|
|
4858
4858
|
case "color-mireds": return call(device.color, "color", (color) => color.setColor({ color: {
|
|
4859
4859
|
mode: "mired",
|
|
4860
|
-
|
|
4860
|
+
colorTemperature: command.mireds
|
|
4861
4861
|
} }));
|
|
4862
4862
|
case "script-verb": return call(device.scriptRunner, "script-runner", (script) => command.verb === "run" ? script.run({}) : script.stop({}));
|
|
4863
4863
|
case "automation-enabled": return call(device.automationControl, "automation-control", (automation) => command.enabled ? automation.enable({}) : automation.disable({}));
|
|
@@ -7029,7 +7029,7 @@ var HaExportAddon = class extends require_dist.BaseAddon {
|
|
|
7029
7029
|
if (capName === "network-link") {
|
|
7030
7030
|
const type = readString(slice, "type");
|
|
7031
7031
|
if (type === null) return;
|
|
7032
|
-
const signalPercent = readNumber(slice, "
|
|
7032
|
+
const signalPercent = readNumber(slice, "signal");
|
|
7033
7033
|
this.push(deviceId, projectNetworkLinkSlice(deviceKey, {
|
|
7034
7034
|
type,
|
|
7035
7035
|
signalPercent
|
|
@@ -7037,7 +7037,7 @@ var HaExportAddon = class extends require_dist.BaseAddon {
|
|
|
7037
7037
|
return;
|
|
7038
7038
|
}
|
|
7039
7039
|
if (capName === "battery") {
|
|
7040
|
-
const percentage = readNumber(slice, "
|
|
7040
|
+
const percentage = readNumber(slice, "level");
|
|
7041
7041
|
const charging = readString(slice, "charging");
|
|
7042
7042
|
const sleeping = slice["sleeping"];
|
|
7043
7043
|
if (percentage === null || charging === null || typeof sleeping !== "boolean") return;
|
|
@@ -7874,12 +7874,12 @@ var HaExportAddon = class extends require_dist.BaseAddon {
|
|
|
7874
7874
|
const type = readString(link, "type");
|
|
7875
7875
|
if (type !== null) values.push(...projectNetworkLinkSlice(key, {
|
|
7876
7876
|
type,
|
|
7877
|
-
signalPercent: readNumber(link, "
|
|
7877
|
+
signalPercent: readNumber(link, "signal")
|
|
7878
7878
|
}));
|
|
7879
7879
|
}
|
|
7880
7880
|
const battery = snapshot["battery"];
|
|
7881
7881
|
if (battery !== void 0) {
|
|
7882
|
-
const percentage = readNumber(battery, "
|
|
7882
|
+
const percentage = readNumber(battery, "level");
|
|
7883
7883
|
const charging = readString(battery, "charging");
|
|
7884
7884
|
const sleeping = battery["sleeping"];
|
|
7885
7885
|
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-6sCUdAUD.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,
|
|
@@ -3459,7 +3459,7 @@ var CAPS_NOT_EXPORTED = [
|
|
|
3459
3459
|
},
|
|
3460
3460
|
{
|
|
3461
3461
|
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.
|
|
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.energy. The source quantity is not on this device yet, so publishing the total as a sensor would give it no unit."
|
|
3463
3463
|
},
|
|
3464
3464
|
{
|
|
3465
3465
|
cap: "group-active",
|
|
@@ -4668,7 +4668,7 @@ async function applyCapCommand(device, command) {
|
|
|
4668
4668
|
reason: "no-provider",
|
|
4669
4669
|
capName: "brightness"
|
|
4670
4670
|
};
|
|
4671
|
-
await device.brightness.setBrightness({
|
|
4671
|
+
await device.brightness.setBrightness({ level: command.percentage });
|
|
4672
4672
|
return { ok: true };
|
|
4673
4673
|
case "cap-alarm":
|
|
4674
4674
|
if (device.alarmPanel === void 0) return {
|
|
@@ -4771,7 +4771,7 @@ async function applyCapCommand(device, command) {
|
|
|
4771
4771
|
});
|
|
4772
4772
|
case "climate-target-humidity": return call(device.climateControl, "climate-control", (climate) => climate.setTargetHumidity({ targetHumidity: command.targetHumidity }));
|
|
4773
4773
|
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({
|
|
4774
|
+
case "fan-percentage": return call(device.fanControl, "fan-control", (fan) => fan.setPercentage({ speed: command.percentage }));
|
|
4775
4775
|
case "fan-preset": return call(device.fanControl, "fan-control", (fan) => fan.setPreset({ preset: command.preset }));
|
|
4776
4776
|
case "fan-oscillating": return call(device.fanControl, "fan-control", (fan) => fan.setOscillating({ oscillating: command.oscillating }));
|
|
4777
4777
|
case "fan-direction": return call(device.fanControl, "fan-control", (fan) => fan.setDirection({ direction: command.direction }));
|
|
@@ -4822,7 +4822,7 @@ async function applyCapCommand(device, command) {
|
|
|
4822
4822
|
case "media-source": return call(device.mediaPlayer, "media-player", (media) => media.selectSource({ source: command.source }));
|
|
4823
4823
|
case "color-mireds": return call(device.color, "color", (color) => color.setColor({ color: {
|
|
4824
4824
|
mode: "mired",
|
|
4825
|
-
|
|
4825
|
+
colorTemperature: command.mireds
|
|
4826
4826
|
} }));
|
|
4827
4827
|
case "script-verb": return call(device.scriptRunner, "script-runner", (script) => command.verb === "run" ? script.run({}) : script.stop({}));
|
|
4828
4828
|
case "automation-enabled": return call(device.automationControl, "automation-control", (automation) => command.enabled ? automation.enable({}) : automation.disable({}));
|
|
@@ -6994,7 +6994,7 @@ var HaExportAddon = class extends BaseAddon {
|
|
|
6994
6994
|
if (capName === "network-link") {
|
|
6995
6995
|
const type = readString(slice, "type");
|
|
6996
6996
|
if (type === null) return;
|
|
6997
|
-
const signalPercent = readNumber(slice, "
|
|
6997
|
+
const signalPercent = readNumber(slice, "signal");
|
|
6998
6998
|
this.push(deviceId, projectNetworkLinkSlice(deviceKey, {
|
|
6999
6999
|
type,
|
|
7000
7000
|
signalPercent
|
|
@@ -7002,7 +7002,7 @@ var HaExportAddon = class extends BaseAddon {
|
|
|
7002
7002
|
return;
|
|
7003
7003
|
}
|
|
7004
7004
|
if (capName === "battery") {
|
|
7005
|
-
const percentage = readNumber(slice, "
|
|
7005
|
+
const percentage = readNumber(slice, "level");
|
|
7006
7006
|
const charging = readString(slice, "charging");
|
|
7007
7007
|
const sleeping = slice["sleeping"];
|
|
7008
7008
|
if (percentage === null || charging === null || typeof sleeping !== "boolean") return;
|
|
@@ -7839,12 +7839,12 @@ var HaExportAddon = class extends BaseAddon {
|
|
|
7839
7839
|
const type = readString(link, "type");
|
|
7840
7840
|
if (type !== null) values.push(...projectNetworkLinkSlice(key, {
|
|
7841
7841
|
type,
|
|
7842
|
-
signalPercent: readNumber(link, "
|
|
7842
|
+
signalPercent: readNumber(link, "signal")
|
|
7843
7843
|
}));
|
|
7844
7844
|
}
|
|
7845
7845
|
const battery = snapshot["battery"];
|
|
7846
7846
|
if (battery !== void 0) {
|
|
7847
|
-
const percentage = readNumber(battery, "
|
|
7847
|
+
const percentage = readNumber(battery, "level");
|
|
7848
7848
|
const charging = readString(battery, "charging");
|
|
7849
7849
|
const sleeping = battery["sleeping"];
|
|
7850
7850
|
if (percentage !== null && charging !== null && typeof sleeping === "boolean") {
|