@camstack/addon-provider-homeassistant 1.2.603 → 1.2.605

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.
@@ -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-DVNChk7-.js");
27
+ const require_dist = require("../dist-DWBNf9hd.js");
28
28
  let node_crypto = require("node:crypto");
29
29
  require("node:zlib");
30
30
  let node_fs = require("node:fs");
@@ -2473,6 +2473,187 @@ var CAP_ENTITY_MAP = {
2473
2473
  }
2474
2474
  }
2475
2475
  },
2476
+ /**
2477
+ * A dishwasher. The headline is the appliance's OWN operation state (`Run`, `DelayedStart`,
2478
+ * `ActionRequired`, …) — not the coarse `state`, which folds nine states into six.
2479
+ *
2480
+ * Every flag is a `binary_sensor` / `switch` whose value is `null` until the appliance has
2481
+ * said: the projector publishes nothing for a null, so Home Assistant shows `unknown`, never
2482
+ * `off` (the slice is nullable for exactly this reason).
2483
+ *
2484
+ * Not mapped, by design: `availablePrograms` / `activeEvents` are arrays, and the program
2485
+ * list is the appliance's own vocabulary (a static `select` would offer programs it rejects);
2486
+ * `selectedProgram` / `program` are exported read-only. The raised events are separate
2487
+ * entities already — one `binary_sensor` per event and the events emitter.
2488
+ */
2489
+ dishwasher: {
2490
+ platform: "sensor",
2491
+ field: "operationState",
2492
+ icon: "mdi:dishwasher",
2493
+ extras: {
2494
+ program: {
2495
+ platform: "sensor",
2496
+ field: "program",
2497
+ label: "Active program",
2498
+ icon: "mdi:dishwasher"
2499
+ },
2500
+ "selected-program": {
2501
+ platform: "sensor",
2502
+ field: "selectedProgram",
2503
+ label: "Selected program",
2504
+ enabledByDefault: false
2505
+ },
2506
+ "remaining-time": {
2507
+ platform: "sensor",
2508
+ field: "remainingSeconds",
2509
+ label: "Remaining time",
2510
+ deviceClass: "duration",
2511
+ unit: "s"
2512
+ },
2513
+ "delayed-start": {
2514
+ platform: "sensor",
2515
+ field: "delayedStartSeconds",
2516
+ label: "Delayed start",
2517
+ deviceClass: "duration",
2518
+ unit: "s",
2519
+ enabledByDefault: false
2520
+ },
2521
+ progress: {
2522
+ platform: "sensor",
2523
+ field: "progressPercent",
2524
+ label: "Progress",
2525
+ unit: "%",
2526
+ enabledByDefault: false
2527
+ },
2528
+ door: {
2529
+ platform: "binary_sensor",
2530
+ field: "doorOpen",
2531
+ label: "Door",
2532
+ deviceClass: "door"
2533
+ },
2534
+ "door-locked": {
2535
+ platform: "binary_sensor",
2536
+ field: "doorLocked",
2537
+ label: "Door locked",
2538
+ icon: "mdi:lock",
2539
+ enabledByDefault: false,
2540
+ entityCategory: "diagnostic"
2541
+ },
2542
+ "remote-start-allowed": {
2543
+ platform: "binary_sensor",
2544
+ field: "remoteStartAllowed",
2545
+ label: "Remote start allowed",
2546
+ enabledByDefault: false
2547
+ },
2548
+ "remote-control": {
2549
+ platform: "binary_sensor",
2550
+ field: "remoteControlActive",
2551
+ label: "Remote control active",
2552
+ enabledByDefault: false,
2553
+ entityCategory: "diagnostic"
2554
+ },
2555
+ "local-control": {
2556
+ platform: "binary_sensor",
2557
+ field: "localControlActive",
2558
+ label: "Local control active",
2559
+ enabledByDefault: false,
2560
+ entityCategory: "diagnostic"
2561
+ },
2562
+ power: {
2563
+ platform: "switch",
2564
+ field: "powerOn",
2565
+ label: "Power",
2566
+ writable: true
2567
+ },
2568
+ "child-lock": {
2569
+ platform: "switch",
2570
+ field: "childLock",
2571
+ label: "Child lock",
2572
+ writable: true,
2573
+ entityCategory: "config",
2574
+ enabledByDefault: false
2575
+ },
2576
+ "half-load": {
2577
+ platform: "switch",
2578
+ field: "halfLoad",
2579
+ label: "Half load",
2580
+ writable: true,
2581
+ entityCategory: "config",
2582
+ enabledByDefault: false
2583
+ },
2584
+ "hygiene-plus": {
2585
+ platform: "switch",
2586
+ field: "hygienePlus",
2587
+ label: "Hygiene plus",
2588
+ writable: true,
2589
+ entityCategory: "config",
2590
+ enabledByDefault: false
2591
+ },
2592
+ "extra-dry": {
2593
+ platform: "switch",
2594
+ field: "extraDry",
2595
+ label: "Extra dry",
2596
+ writable: true,
2597
+ entityCategory: "config",
2598
+ enabledByDefault: false
2599
+ },
2600
+ "intensive-zone": {
2601
+ platform: "switch",
2602
+ field: "intensiveZone",
2603
+ label: "Intensive zone",
2604
+ writable: true,
2605
+ entityCategory: "config",
2606
+ enabledByDefault: false
2607
+ },
2608
+ "vario-speed-plus": {
2609
+ platform: "switch",
2610
+ field: "varioSpeedPlus",
2611
+ label: "VarioSpeed+",
2612
+ writable: true,
2613
+ entityCategory: "config",
2614
+ enabledByDefault: false
2615
+ },
2616
+ salt: {
2617
+ platform: "sensor",
2618
+ field: "saltLevel",
2619
+ label: "Salt level",
2620
+ enabledByDefault: false
2621
+ },
2622
+ "rinse-aid": {
2623
+ platform: "sensor",
2624
+ field: "rinseAidLevel",
2625
+ label: "Rinse aid level",
2626
+ enabledByDefault: false
2627
+ },
2628
+ error: {
2629
+ platform: "sensor",
2630
+ field: "errorLabel",
2631
+ label: "Error",
2632
+ entityCategory: "diagnostic",
2633
+ enabledByDefault: false
2634
+ }
2635
+ },
2636
+ commands: {
2637
+ start: {
2638
+ label: "Start",
2639
+ icon: "mdi:play"
2640
+ },
2641
+ pause: {
2642
+ label: "Pause",
2643
+ icon: "mdi:pause"
2644
+ },
2645
+ resume: {
2646
+ label: "Resume",
2647
+ icon: "mdi:play-pause",
2648
+ enabledByDefault: false
2649
+ },
2650
+ stop: {
2651
+ label: "Stop",
2652
+ icon: "mdi:stop",
2653
+ enabledByDefault: false
2654
+ }
2655
+ }
2656
+ },
2476
2657
  "lawn-mower-control": {
2477
2658
  platform: "sensor",
2478
2659
  field: "activity",
@@ -3460,6 +3641,18 @@ function parseEnum(schema, value) {
3460
3641
  const parsed = schema.safeParse(value.trim().toLowerCase());
3461
3642
  return parsed.success ? parsed.data : null;
3462
3643
  }
3644
+ /** A dishwasher `{ on }` switch: an unparseable payload is refused, never read as "off". */
3645
+ function dishwasherSwitch(control) {
3646
+ return (deviceId, value) => {
3647
+ const on = parseBool(value);
3648
+ return on === null ? null : {
3649
+ kind: "dishwasher-switch",
3650
+ deviceId,
3651
+ control,
3652
+ on
3653
+ };
3654
+ };
3655
+ }
3463
3656
  /**
3464
3657
  * capability → the commands that WRITE it.
3465
3658
  *
@@ -3814,6 +4007,39 @@ var CAP_COMMAND_ROUTES = {
3814
4007
  })
3815
4008
  }
3816
4009
  },
4010
+ dishwasher: {
4011
+ extras: {
4012
+ power: dishwasherSwitch("power"),
4013
+ "child-lock": dishwasherSwitch("child-lock"),
4014
+ "half-load": dishwasherSwitch("half-load"),
4015
+ "hygiene-plus": dishwasherSwitch("hygiene-plus"),
4016
+ "extra-dry": dishwasherSwitch("extra-dry"),
4017
+ "intensive-zone": dishwasherSwitch("intensive-zone"),
4018
+ "vario-speed-plus": dishwasherSwitch("vario-speed-plus")
4019
+ },
4020
+ commands: {
4021
+ start: (deviceId) => ({
4022
+ kind: "dishwasher-verb",
4023
+ deviceId,
4024
+ verb: "start"
4025
+ }),
4026
+ pause: (deviceId) => ({
4027
+ kind: "dishwasher-verb",
4028
+ deviceId,
4029
+ verb: "pause"
4030
+ }),
4031
+ resume: (deviceId) => ({
4032
+ kind: "dishwasher-verb",
4033
+ deviceId,
4034
+ verb: "resume"
4035
+ }),
4036
+ stop: (deviceId) => ({
4037
+ kind: "dishwasher-verb",
4038
+ deviceId,
4039
+ verb: "stop"
4040
+ })
4041
+ }
4042
+ },
3817
4043
  "lawn-mower-control": { commands: {
3818
4044
  start: (deviceId) => ({
3819
4045
  kind: "mower-verb",
@@ -4334,6 +4560,25 @@ async function applyCapCommand(device, command) {
4334
4560
  case "script-verb": return call(device.scriptRunner, "script-runner", (script) => command.verb === "run" ? script.run({}) : script.stop({}));
4335
4561
  case "automation-enabled": return call(device.automationControl, "automation-control", (automation) => command.enabled ? automation.enable({}) : automation.disable({}));
4336
4562
  case "automation-trigger": return call(device.automationControl, "automation-control", (automation) => automation.trigger({}));
4563
+ case "dishwasher-verb": return call(device.dishwasher, "dishwasher", (dishwasher) => {
4564
+ switch (command.verb) {
4565
+ case "start": return dishwasher.start({});
4566
+ case "pause": return dishwasher.pause({});
4567
+ case "resume": return dishwasher.resume({});
4568
+ case "stop": return dishwasher.stop({});
4569
+ }
4570
+ });
4571
+ case "dishwasher-switch": return call(device.dishwasher, "dishwasher", (dishwasher) => {
4572
+ switch (command.control) {
4573
+ case "power": return dishwasher.setPower({ on: command.on });
4574
+ case "child-lock": return dishwasher.setChildLock({ on: command.on });
4575
+ case "half-load": return dishwasher.setHalfLoad({ on: command.on });
4576
+ case "hygiene-plus": return dishwasher.setHygienePlus({ on: command.on });
4577
+ case "extra-dry": return dishwasher.setExtraDry({ on: command.on });
4578
+ case "intensive-zone": return dishwasher.setIntensiveZone({ on: command.on });
4579
+ case "vario-speed-plus": return dishwasher.setVarioSpeedPlus({ on: command.on });
4580
+ }
4581
+ });
4337
4582
  }
4338
4583
  }
4339
4584
  /**
@@ -1,4 +1,4 @@
1
- import { $ as oauthIntegrationCapability, Bt as EventCategory, C as buildAddonRouteProvider, Et as nodePin, I as deviceExportCapability, It as string, a as COCO_TO_MACRO, bt as BaseAddon, c as FanDirectionSchema, i as CAMERA_SWITCH_ORDER, l as HvacModeSchema, o as CameraSwitchIdSchema, p as addonRoutesCapability, t as AlarmArmModeSchema, u as MediaPlayerRepeatSchema } from "../dist-CM5Z-Rdj.mjs";
1
+ import { $ as oauthIntegrationCapability, Bt as EventCategory, C as buildAddonRouteProvider, Et as nodePin, I as deviceExportCapability, It as string, a as COCO_TO_MACRO, bt as BaseAddon, c as FanDirectionSchema, i as CAMERA_SWITCH_ORDER, l as HvacModeSchema, o as CameraSwitchIdSchema, p as addonRoutesCapability, t as AlarmArmModeSchema, u as MediaPlayerRepeatSchema } from "../dist-DV_2NKnd.mjs";
2
2
  import { createHmac, timingSafeEqual } from "node:crypto";
3
3
  import "node:zlib";
4
4
  import "node:fs";
@@ -2445,6 +2445,187 @@ var CAP_ENTITY_MAP = {
2445
2445
  }
2446
2446
  }
2447
2447
  },
2448
+ /**
2449
+ * A dishwasher. The headline is the appliance's OWN operation state (`Run`, `DelayedStart`,
2450
+ * `ActionRequired`, …) — not the coarse `state`, which folds nine states into six.
2451
+ *
2452
+ * Every flag is a `binary_sensor` / `switch` whose value is `null` until the appliance has
2453
+ * said: the projector publishes nothing for a null, so Home Assistant shows `unknown`, never
2454
+ * `off` (the slice is nullable for exactly this reason).
2455
+ *
2456
+ * Not mapped, by design: `availablePrograms` / `activeEvents` are arrays, and the program
2457
+ * list is the appliance's own vocabulary (a static `select` would offer programs it rejects);
2458
+ * `selectedProgram` / `program` are exported read-only. The raised events are separate
2459
+ * entities already — one `binary_sensor` per event and the events emitter.
2460
+ */
2461
+ dishwasher: {
2462
+ platform: "sensor",
2463
+ field: "operationState",
2464
+ icon: "mdi:dishwasher",
2465
+ extras: {
2466
+ program: {
2467
+ platform: "sensor",
2468
+ field: "program",
2469
+ label: "Active program",
2470
+ icon: "mdi:dishwasher"
2471
+ },
2472
+ "selected-program": {
2473
+ platform: "sensor",
2474
+ field: "selectedProgram",
2475
+ label: "Selected program",
2476
+ enabledByDefault: false
2477
+ },
2478
+ "remaining-time": {
2479
+ platform: "sensor",
2480
+ field: "remainingSeconds",
2481
+ label: "Remaining time",
2482
+ deviceClass: "duration",
2483
+ unit: "s"
2484
+ },
2485
+ "delayed-start": {
2486
+ platform: "sensor",
2487
+ field: "delayedStartSeconds",
2488
+ label: "Delayed start",
2489
+ deviceClass: "duration",
2490
+ unit: "s",
2491
+ enabledByDefault: false
2492
+ },
2493
+ progress: {
2494
+ platform: "sensor",
2495
+ field: "progressPercent",
2496
+ label: "Progress",
2497
+ unit: "%",
2498
+ enabledByDefault: false
2499
+ },
2500
+ door: {
2501
+ platform: "binary_sensor",
2502
+ field: "doorOpen",
2503
+ label: "Door",
2504
+ deviceClass: "door"
2505
+ },
2506
+ "door-locked": {
2507
+ platform: "binary_sensor",
2508
+ field: "doorLocked",
2509
+ label: "Door locked",
2510
+ icon: "mdi:lock",
2511
+ enabledByDefault: false,
2512
+ entityCategory: "diagnostic"
2513
+ },
2514
+ "remote-start-allowed": {
2515
+ platform: "binary_sensor",
2516
+ field: "remoteStartAllowed",
2517
+ label: "Remote start allowed",
2518
+ enabledByDefault: false
2519
+ },
2520
+ "remote-control": {
2521
+ platform: "binary_sensor",
2522
+ field: "remoteControlActive",
2523
+ label: "Remote control active",
2524
+ enabledByDefault: false,
2525
+ entityCategory: "diagnostic"
2526
+ },
2527
+ "local-control": {
2528
+ platform: "binary_sensor",
2529
+ field: "localControlActive",
2530
+ label: "Local control active",
2531
+ enabledByDefault: false,
2532
+ entityCategory: "diagnostic"
2533
+ },
2534
+ power: {
2535
+ platform: "switch",
2536
+ field: "powerOn",
2537
+ label: "Power",
2538
+ writable: true
2539
+ },
2540
+ "child-lock": {
2541
+ platform: "switch",
2542
+ field: "childLock",
2543
+ label: "Child lock",
2544
+ writable: true,
2545
+ entityCategory: "config",
2546
+ enabledByDefault: false
2547
+ },
2548
+ "half-load": {
2549
+ platform: "switch",
2550
+ field: "halfLoad",
2551
+ label: "Half load",
2552
+ writable: true,
2553
+ entityCategory: "config",
2554
+ enabledByDefault: false
2555
+ },
2556
+ "hygiene-plus": {
2557
+ platform: "switch",
2558
+ field: "hygienePlus",
2559
+ label: "Hygiene plus",
2560
+ writable: true,
2561
+ entityCategory: "config",
2562
+ enabledByDefault: false
2563
+ },
2564
+ "extra-dry": {
2565
+ platform: "switch",
2566
+ field: "extraDry",
2567
+ label: "Extra dry",
2568
+ writable: true,
2569
+ entityCategory: "config",
2570
+ enabledByDefault: false
2571
+ },
2572
+ "intensive-zone": {
2573
+ platform: "switch",
2574
+ field: "intensiveZone",
2575
+ label: "Intensive zone",
2576
+ writable: true,
2577
+ entityCategory: "config",
2578
+ enabledByDefault: false
2579
+ },
2580
+ "vario-speed-plus": {
2581
+ platform: "switch",
2582
+ field: "varioSpeedPlus",
2583
+ label: "VarioSpeed+",
2584
+ writable: true,
2585
+ entityCategory: "config",
2586
+ enabledByDefault: false
2587
+ },
2588
+ salt: {
2589
+ platform: "sensor",
2590
+ field: "saltLevel",
2591
+ label: "Salt level",
2592
+ enabledByDefault: false
2593
+ },
2594
+ "rinse-aid": {
2595
+ platform: "sensor",
2596
+ field: "rinseAidLevel",
2597
+ label: "Rinse aid level",
2598
+ enabledByDefault: false
2599
+ },
2600
+ error: {
2601
+ platform: "sensor",
2602
+ field: "errorLabel",
2603
+ label: "Error",
2604
+ entityCategory: "diagnostic",
2605
+ enabledByDefault: false
2606
+ }
2607
+ },
2608
+ commands: {
2609
+ start: {
2610
+ label: "Start",
2611
+ icon: "mdi:play"
2612
+ },
2613
+ pause: {
2614
+ label: "Pause",
2615
+ icon: "mdi:pause"
2616
+ },
2617
+ resume: {
2618
+ label: "Resume",
2619
+ icon: "mdi:play-pause",
2620
+ enabledByDefault: false
2621
+ },
2622
+ stop: {
2623
+ label: "Stop",
2624
+ icon: "mdi:stop",
2625
+ enabledByDefault: false
2626
+ }
2627
+ }
2628
+ },
2448
2629
  "lawn-mower-control": {
2449
2630
  platform: "sensor",
2450
2631
  field: "activity",
@@ -3432,6 +3613,18 @@ function parseEnum(schema, value) {
3432
3613
  const parsed = schema.safeParse(value.trim().toLowerCase());
3433
3614
  return parsed.success ? parsed.data : null;
3434
3615
  }
3616
+ /** A dishwasher `{ on }` switch: an unparseable payload is refused, never read as "off". */
3617
+ function dishwasherSwitch(control) {
3618
+ return (deviceId, value) => {
3619
+ const on = parseBool(value);
3620
+ return on === null ? null : {
3621
+ kind: "dishwasher-switch",
3622
+ deviceId,
3623
+ control,
3624
+ on
3625
+ };
3626
+ };
3627
+ }
3435
3628
  /**
3436
3629
  * capability → the commands that WRITE it.
3437
3630
  *
@@ -3786,6 +3979,39 @@ var CAP_COMMAND_ROUTES = {
3786
3979
  })
3787
3980
  }
3788
3981
  },
3982
+ dishwasher: {
3983
+ extras: {
3984
+ power: dishwasherSwitch("power"),
3985
+ "child-lock": dishwasherSwitch("child-lock"),
3986
+ "half-load": dishwasherSwitch("half-load"),
3987
+ "hygiene-plus": dishwasherSwitch("hygiene-plus"),
3988
+ "extra-dry": dishwasherSwitch("extra-dry"),
3989
+ "intensive-zone": dishwasherSwitch("intensive-zone"),
3990
+ "vario-speed-plus": dishwasherSwitch("vario-speed-plus")
3991
+ },
3992
+ commands: {
3993
+ start: (deviceId) => ({
3994
+ kind: "dishwasher-verb",
3995
+ deviceId,
3996
+ verb: "start"
3997
+ }),
3998
+ pause: (deviceId) => ({
3999
+ kind: "dishwasher-verb",
4000
+ deviceId,
4001
+ verb: "pause"
4002
+ }),
4003
+ resume: (deviceId) => ({
4004
+ kind: "dishwasher-verb",
4005
+ deviceId,
4006
+ verb: "resume"
4007
+ }),
4008
+ stop: (deviceId) => ({
4009
+ kind: "dishwasher-verb",
4010
+ deviceId,
4011
+ verb: "stop"
4012
+ })
4013
+ }
4014
+ },
3789
4015
  "lawn-mower-control": { commands: {
3790
4016
  start: (deviceId) => ({
3791
4017
  kind: "mower-verb",
@@ -4306,6 +4532,25 @@ async function applyCapCommand(device, command) {
4306
4532
  case "script-verb": return call(device.scriptRunner, "script-runner", (script) => command.verb === "run" ? script.run({}) : script.stop({}));
4307
4533
  case "automation-enabled": return call(device.automationControl, "automation-control", (automation) => command.enabled ? automation.enable({}) : automation.disable({}));
4308
4534
  case "automation-trigger": return call(device.automationControl, "automation-control", (automation) => automation.trigger({}));
4535
+ case "dishwasher-verb": return call(device.dishwasher, "dishwasher", (dishwasher) => {
4536
+ switch (command.verb) {
4537
+ case "start": return dishwasher.start({});
4538
+ case "pause": return dishwasher.pause({});
4539
+ case "resume": return dishwasher.resume({});
4540
+ case "stop": return dishwasher.stop({});
4541
+ }
4542
+ });
4543
+ case "dishwasher-switch": return call(device.dishwasher, "dishwasher", (dishwasher) => {
4544
+ switch (command.control) {
4545
+ case "power": return dishwasher.setPower({ on: command.on });
4546
+ case "child-lock": return dishwasher.setChildLock({ on: command.on });
4547
+ case "half-load": return dishwasher.setHalfLoad({ on: command.on });
4548
+ case "hygiene-plus": return dishwasher.setHygienePlus({ on: command.on });
4549
+ case "extra-dry": return dishwasher.setExtraDry({ on: command.on });
4550
+ case "intensive-zone": return dishwasher.setIntensiveZone({ on: command.on });
4551
+ case "vario-speed-plus": return dishwasher.setVarioSpeedPlus({ on: command.on });
4552
+ }
4553
+ });
4309
4554
  }
4310
4555
  }
4311
4556
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-homeassistant",
3
- "version": "1.2.603",
3
+ "version": "1.2.605",
4
4
  "description": "Home Assistant device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",