@camstack/addon-provider-homeassistant 1.2.652 → 1.2.654
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 +13 -0
- package/dist/addon.js +669 -495
- package/dist/addon.mjs +206 -32
- package/dist/ha-export/ha-export.addon.js +382 -130
- package/dist/ha-export/ha-export.addon.mjs +336 -84
- package/dist/{ha-broker-source-D3ScsO0T.js → ha-instance-settings-Bn_Trz6p.js} +502 -220
- package/dist/{ha-broker-source-CBWl6Wat.mjs → ha-instance-settings-g5pwb3Fi.mjs} +484 -220
- package/package.json +2 -2
|
@@ -784,7 +784,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
784
784
|
return EventCategory;
|
|
785
785
|
}({});
|
|
786
786
|
//#endregion
|
|
787
|
-
//#region ../types/dist/device-type-
|
|
787
|
+
//#region ../types/dist/device-type-D1fH5kaC.mjs
|
|
788
788
|
/**
|
|
789
789
|
import { errMsg } from '@camstack/types'
|
|
790
790
|
* Extract a human-readable message from an unknown error value.
|
|
@@ -1015,6 +1015,12 @@ var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
|
1015
1015
|
DeviceFeature["MediaPlayerPrevious"] = "media-player-previous";
|
|
1016
1016
|
/** Media player exposes stop distinct from pause. */
|
|
1017
1017
|
DeviceFeature["MediaPlayerStop"] = "media-player-stop";
|
|
1018
|
+
/** Media player exposes volume up / down in steps (an infrared TV has no level). */
|
|
1019
|
+
DeviceFeature["MediaPlayerVolumeStep"] = "media-player-volume-step";
|
|
1020
|
+
/** Media player exposes channel up / down in steps. */
|
|
1021
|
+
DeviceFeature["MediaPlayerChannelStep"] = "media-player-channel-step";
|
|
1022
|
+
/** Media player exposes power on / off. */
|
|
1023
|
+
DeviceFeature["MediaPlayerPower"] = "media-player-power";
|
|
1018
1024
|
/** Alarm panel requires a PIN code on arm/disarm. */
|
|
1019
1025
|
DeviceFeature["AlarmPinRequired"] = "alarm-pin-required";
|
|
1020
1026
|
/** Presence device carries GPS coordinates (lat/lng/accuracy) in
|
|
@@ -5974,7 +5980,7 @@ var ZodIssueCode = {
|
|
|
5974
5980
|
var ZodFirstPartyTypeKind;
|
|
5975
5981
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5976
5982
|
//#endregion
|
|
5977
|
-
//#region ../types/dist/sleep-
|
|
5983
|
+
//#region ../types/dist/sleep-BKClVk0K.mjs
|
|
5978
5984
|
/**
|
|
5979
5985
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5980
5986
|
* window to float samples (D455).
|
|
@@ -6053,6 +6059,22 @@ function buildAlawTable() {
|
|
|
6053
6059
|
}
|
|
6054
6060
|
buildUlawTable();
|
|
6055
6061
|
buildAlawTable();
|
|
6062
|
+
/**
|
|
6063
|
+
* An addon whose own migrations did not apply refuses to initialise (D987). The error is typed
|
|
6064
|
+
* so a runner hosting several addons can tell "this addon is blocked" from a crash and keep its
|
|
6065
|
+
* co-located siblings running. Recognised by NAME and shape, never `instanceof`: a forked addon
|
|
6066
|
+
* bundles its own copy of this module, so the class the runner sees is not the one that threw.
|
|
6067
|
+
*/
|
|
6068
|
+
var MIGRATIONS_BLOCKED_ERROR_NAME = "AddonMigrationsBlockedError";
|
|
6069
|
+
var AddonMigrationsBlockedError = class extends Error {
|
|
6070
|
+
/** The ledger ids that did not apply and block the owner. */
|
|
6071
|
+
migrationIds;
|
|
6072
|
+
constructor(migrationIds) {
|
|
6073
|
+
super(`migration(s) ${migrationIds.join(", ")} did not apply and block this addon — fix or retry them (migrations.retry), then restart it`);
|
|
6074
|
+
this.name = MIGRATIONS_BLOCKED_ERROR_NAME;
|
|
6075
|
+
this.migrationIds = migrationIds;
|
|
6076
|
+
}
|
|
6077
|
+
};
|
|
6056
6078
|
/** Is this field's stored value a credential? */
|
|
6057
6079
|
function isSecretConfigField(field) {
|
|
6058
6080
|
if (field.type === "password") return true;
|
|
@@ -7706,7 +7728,7 @@ var BaseAddon = class {
|
|
|
7706
7728
|
startMigration: (input) => api.startMigration.mutate(input),
|
|
7707
7729
|
finishMigration: (input) => api.finishMigration.mutate(input)
|
|
7708
7730
|
}, migrations, this.ctx.logger);
|
|
7709
|
-
if (report.blockOwner.length > 0) throw new
|
|
7731
|
+
if (report.blockOwner.length > 0) throw new AddonMigrationsBlockedError(report.blockOwner);
|
|
7710
7732
|
return report;
|
|
7711
7733
|
}
|
|
7712
7734
|
/**
|
|
@@ -11764,7 +11786,7 @@ object({
|
|
|
11764
11786
|
params: record(string(), union([string(), number()])).optional()
|
|
11765
11787
|
});
|
|
11766
11788
|
//#endregion
|
|
11767
|
-
//#region ../types/dist/composition-
|
|
11789
|
+
//#region ../types/dist/composition-BodkvOV0.mjs
|
|
11768
11790
|
/**
|
|
11769
11791
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
11770
11792
|
*
|
|
@@ -12901,7 +12923,14 @@ var CompositionForwardCommandSchema = object({
|
|
|
12901
12923
|
method: string().min(1),
|
|
12902
12924
|
args: record(string().min(1), CompositionForwardArgSchema).optional()
|
|
12903
12925
|
});
|
|
12904
|
-
var CompositionCommandTargetSchema = discriminatedUnion("kind", [
|
|
12926
|
+
var CompositionCommandTargetSchema = discriminatedUnion("kind", [
|
|
12927
|
+
CompositionForwardCommandSchema,
|
|
12928
|
+
CompositionCodeSourceSchema,
|
|
12929
|
+
object({
|
|
12930
|
+
kind: literal("extension"),
|
|
12931
|
+
target: literal("remote")
|
|
12932
|
+
})
|
|
12933
|
+
]);
|
|
12905
12934
|
/** An item key inside an item-array cap (`consumables.items[<key>]`). */
|
|
12906
12935
|
var COMPOSITION_ITEM_KEY_RE = /^[a-z0-9][a-z0-9-]{0,47}$/;
|
|
12907
12936
|
/**
|
|
@@ -19562,6 +19591,48 @@ var APPLIANCE_CAP_VOCABULARY = {
|
|
|
19562
19591
|
scope: "device",
|
|
19563
19592
|
noun: t("Media player", "Lettore multimediale"),
|
|
19564
19593
|
actions: [
|
|
19594
|
+
{
|
|
19595
|
+
id: "media.turnOn",
|
|
19596
|
+
method: "turnOn",
|
|
19597
|
+
label: t("Turn on", "Accendi"),
|
|
19598
|
+
phrase: t("Turn on {device}", "Accendi {device}"),
|
|
19599
|
+
icon: "power"
|
|
19600
|
+
},
|
|
19601
|
+
{
|
|
19602
|
+
id: "media.turnOff",
|
|
19603
|
+
method: "turnOff",
|
|
19604
|
+
label: t("Turn off", "Spegni"),
|
|
19605
|
+
phrase: t("Turn off {device}", "Spegni {device}"),
|
|
19606
|
+
icon: "power"
|
|
19607
|
+
},
|
|
19608
|
+
{
|
|
19609
|
+
id: "media.volumeUp",
|
|
19610
|
+
method: "volumeUp",
|
|
19611
|
+
label: t("Volume up", "Alza il volume"),
|
|
19612
|
+
phrase: t("Raise the volume of {device}", "Alza il volume di {device}"),
|
|
19613
|
+
icon: "volume-2"
|
|
19614
|
+
},
|
|
19615
|
+
{
|
|
19616
|
+
id: "media.volumeDown",
|
|
19617
|
+
method: "volumeDown",
|
|
19618
|
+
label: t("Volume down", "Abbassa il volume"),
|
|
19619
|
+
phrase: t("Lower the volume of {device}", "Abbassa il volume di {device}"),
|
|
19620
|
+
icon: "volume-2"
|
|
19621
|
+
},
|
|
19622
|
+
{
|
|
19623
|
+
id: "media.channelUp",
|
|
19624
|
+
method: "channelUp",
|
|
19625
|
+
label: t("Channel up", "Canale successivo"),
|
|
19626
|
+
phrase: t("Go to the next channel on {device}", "Passa al canale successivo su {device}"),
|
|
19627
|
+
icon: "skip-forward"
|
|
19628
|
+
},
|
|
19629
|
+
{
|
|
19630
|
+
id: "media.channelDown",
|
|
19631
|
+
method: "channelDown",
|
|
19632
|
+
label: t("Channel down", "Canale precedente"),
|
|
19633
|
+
phrase: t("Go to the previous channel on {device}", "Torna al canale precedente su {device}"),
|
|
19634
|
+
icon: "skip-back"
|
|
19635
|
+
},
|
|
19565
19636
|
{
|
|
19566
19637
|
id: "media.play",
|
|
19567
19638
|
method: "play",
|
|
@@ -49531,6 +49602,244 @@ var controlCapability = {
|
|
|
49531
49602
|
*/
|
|
49532
49603
|
history: "none"
|
|
49533
49604
|
};
|
|
49605
|
+
/**
|
|
49606
|
+
* Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
|
|
49607
|
+
* Apple TV, Spotify, Roku, generic OTT receivers, …) on
|
|
49608
|
+
* `DeviceType.MediaPlayer`. Disjoint from the camera streaming
|
|
49609
|
+
* surface — those use `DeviceType.Camera` + the broker pipeline.
|
|
49610
|
+
*
|
|
49611
|
+
* The cap declares a wide method surface; not every backend supports
|
|
49612
|
+
* every method. Drivers signal sub-capability via the
|
|
49613
|
+
* `DeviceFeature.MediaPlayerXxx` flags (paired one-to-one with the
|
|
49614
|
+
* corresponding method) so the UI gates buttons without a slice
|
|
49615
|
+
* fetch — same pattern as `PanTiltZoom` for cameras.
|
|
49616
|
+
*/
|
|
49617
|
+
var MediaPlayerStateSchema = _enum([
|
|
49618
|
+
"off",
|
|
49619
|
+
"on",
|
|
49620
|
+
"idle",
|
|
49621
|
+
"playing",
|
|
49622
|
+
"paused",
|
|
49623
|
+
"buffering",
|
|
49624
|
+
"standby"
|
|
49625
|
+
]);
|
|
49626
|
+
var MediaPlayerRepeatSchema = _enum([
|
|
49627
|
+
"off",
|
|
49628
|
+
"all",
|
|
49629
|
+
"one"
|
|
49630
|
+
]);
|
|
49631
|
+
var MediaInfoSchema = object({
|
|
49632
|
+
/** Free-form media kind (`music`, `tvshow`, `movie`, `app`, `channel`,
|
|
49633
|
+
* `podcast`, …). */
|
|
49634
|
+
type: string(),
|
|
49635
|
+
/** Human-readable title. */
|
|
49636
|
+
title: string(),
|
|
49637
|
+
/** Optional artist / channel / station label. */
|
|
49638
|
+
artist: string().optional(),
|
|
49639
|
+
/** Optional album / season / show name. */
|
|
49640
|
+
album: string().optional(),
|
|
49641
|
+
/** Optional cover-art / thumbnail URL. */
|
|
49642
|
+
imageUrl: string().optional()
|
|
49643
|
+
});
|
|
49644
|
+
/**
|
|
49645
|
+
* Where `state`, `volumeLevel`, `isMuted` and `source` come from. `reported`:
|
|
49646
|
+
* the device said so. `assumed`: the driver has no feedback (infrared) and
|
|
49647
|
+
* tracks what it last SENT; it moves only after a send was accepted, and a
|
|
49648
|
+
* human at the real remote makes it wrong. A UI shows an assumed value as a
|
|
49649
|
+
* guess, never as a reading.
|
|
49650
|
+
*/
|
|
49651
|
+
var MediaPlayerStateSourceSchema = _enum(["reported", "assumed"]);
|
|
49652
|
+
/** The fields of a media-player status a driver can only guess. */
|
|
49653
|
+
var MediaPlayerAssumedFieldSchema = _enum([
|
|
49654
|
+
"state",
|
|
49655
|
+
"volumeLevel",
|
|
49656
|
+
"isMuted",
|
|
49657
|
+
"source"
|
|
49658
|
+
]);
|
|
49659
|
+
var MediaPlayerStatusSchema = object({
|
|
49660
|
+
/** Playback lifecycle state. */
|
|
49661
|
+
state: MediaPlayerStateSchema,
|
|
49662
|
+
/**
|
|
49663
|
+
* Whether the state fields are readings or the driver's own bookkeeping.
|
|
49664
|
+
* A slice written before this field existed parses as `reported`.
|
|
49665
|
+
*/
|
|
49666
|
+
stateSource: MediaPlayerStateSourceSchema.default("reported"),
|
|
49667
|
+
/**
|
|
49668
|
+
* Which fields are the driver's own guess. `stateSource` is `assumed` when
|
|
49669
|
+
* this is not empty; a field not listed here is a reading even then (power
|
|
49670
|
+
* from a running-state source, mute guessed from the last send).
|
|
49671
|
+
*/
|
|
49672
|
+
assumedFields: array(MediaPlayerAssumedFieldSchema).default([]),
|
|
49673
|
+
/** Volume as 0..100 inclusive. Null when the device has no volume
|
|
49674
|
+
* surface. Pair with `DeviceFeature.MediaPlayerVolume`. */
|
|
49675
|
+
volumeLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
49676
|
+
/** Mute toggle distinct from volume=0. Null when no mute surface.
|
|
49677
|
+
* Pair with `DeviceFeature.MediaPlayerMute`. */
|
|
49678
|
+
isMuted: boolean().nullable(),
|
|
49679
|
+
/** Active source / input. Empty when no source surface. */
|
|
49680
|
+
source: string(),
|
|
49681
|
+
/** Selectable sources. Empty when no source surface.
|
|
49682
|
+
* Pair with `DeviceFeature.MediaPlayerSelectSource`. */
|
|
49683
|
+
availableSources: array(string()),
|
|
49684
|
+
/** Currently-playing media info. Null when nothing is playing. */
|
|
49685
|
+
currentMedia: MediaInfoSchema.nullable(),
|
|
49686
|
+
/** Current playback position in ms. Null when not seekable or
|
|
49687
|
+
* nothing is playing. Pair with `DeviceFeature.MediaPlayerSeek`. */
|
|
49688
|
+
position: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
|
|
49689
|
+
/** Total duration of the current media in ms. Null when unknown
|
|
49690
|
+
* (live stream) or nothing is playing. */
|
|
49691
|
+
duration: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
|
|
49692
|
+
/** Shuffle toggle. Null when no shuffle surface.
|
|
49693
|
+
* Pair with `DeviceFeature.MediaPlayerShuffle`. */
|
|
49694
|
+
shuffle: boolean().nullable(),
|
|
49695
|
+
/** Repeat mode. Null when no repeat surface.
|
|
49696
|
+
* Pair with `DeviceFeature.MediaPlayerRepeat`. */
|
|
49697
|
+
repeat: MediaPlayerRepeatSchema.nullable(),
|
|
49698
|
+
/** Ms epoch when the slice was last updated. */
|
|
49699
|
+
lastChangedAt: number()
|
|
49700
|
+
});
|
|
49701
|
+
var stepInput = object({
|
|
49702
|
+
deviceId: number().int().nonnegative(),
|
|
49703
|
+
/** How many presses: the caller's count (Alexa `volumeSteps`, `channelCount`). */
|
|
49704
|
+
steps: number().int().min(1).max(50).default(1)
|
|
49705
|
+
});
|
|
49706
|
+
var deviceOnly = object({ deviceId: number().int().nonnegative() });
|
|
49707
|
+
var mediaPlayerCapability = {
|
|
49708
|
+
name: "media-player",
|
|
49709
|
+
scope: "device",
|
|
49710
|
+
deviceNative: true,
|
|
49711
|
+
mode: "singleton",
|
|
49712
|
+
deviceTypes: [DeviceType.MediaPlayer],
|
|
49713
|
+
methods: {
|
|
49714
|
+
turnOn: method(deviceOnly, _void(), {
|
|
49715
|
+
kind: "mutation",
|
|
49716
|
+
auth: "protected"
|
|
49717
|
+
}),
|
|
49718
|
+
turnOff: method(deviceOnly, _void(), {
|
|
49719
|
+
kind: "mutation",
|
|
49720
|
+
auth: "protected"
|
|
49721
|
+
}),
|
|
49722
|
+
volumeUp: method(stepInput, _void(), {
|
|
49723
|
+
kind: "mutation",
|
|
49724
|
+
auth: "protected"
|
|
49725
|
+
}),
|
|
49726
|
+
volumeDown: method(stepInput, _void(), {
|
|
49727
|
+
kind: "mutation",
|
|
49728
|
+
auth: "protected"
|
|
49729
|
+
}),
|
|
49730
|
+
channelUp: method(stepInput, _void(), {
|
|
49731
|
+
kind: "mutation",
|
|
49732
|
+
auth: "protected"
|
|
49733
|
+
}),
|
|
49734
|
+
channelDown: method(stepInput, _void(), {
|
|
49735
|
+
kind: "mutation",
|
|
49736
|
+
auth: "protected"
|
|
49737
|
+
}),
|
|
49738
|
+
play: method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
49739
|
+
kind: "mutation",
|
|
49740
|
+
auth: "protected"
|
|
49741
|
+
}),
|
|
49742
|
+
pause: method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
49743
|
+
kind: "mutation",
|
|
49744
|
+
auth: "protected"
|
|
49745
|
+
}),
|
|
49746
|
+
stop: method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
49747
|
+
kind: "mutation",
|
|
49748
|
+
auth: "protected"
|
|
49749
|
+
}),
|
|
49750
|
+
next: method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
49751
|
+
kind: "mutation",
|
|
49752
|
+
auth: "protected"
|
|
49753
|
+
}),
|
|
49754
|
+
previous: method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
49755
|
+
kind: "mutation",
|
|
49756
|
+
auth: "protected"
|
|
49757
|
+
}),
|
|
49758
|
+
seek: method(object({
|
|
49759
|
+
deviceId: number().int().nonnegative(),
|
|
49760
|
+
position: number().int().nonnegative()
|
|
49761
|
+
}), _void(), {
|
|
49762
|
+
kind: "mutation",
|
|
49763
|
+
auth: "protected"
|
|
49764
|
+
}),
|
|
49765
|
+
setVolume: method(object({
|
|
49766
|
+
deviceId: number().int().nonnegative(),
|
|
49767
|
+
volumeLevel: number().min(0).max(100)
|
|
49768
|
+
}), _void(), {
|
|
49769
|
+
kind: "mutation",
|
|
49770
|
+
auth: "protected"
|
|
49771
|
+
}),
|
|
49772
|
+
setMute: method(object({
|
|
49773
|
+
deviceId: number().int().nonnegative(),
|
|
49774
|
+
muted: boolean()
|
|
49775
|
+
}), _void(), {
|
|
49776
|
+
kind: "mutation",
|
|
49777
|
+
auth: "protected"
|
|
49778
|
+
}),
|
|
49779
|
+
setShuffle: method(object({
|
|
49780
|
+
deviceId: number().int().nonnegative(),
|
|
49781
|
+
shuffle: boolean()
|
|
49782
|
+
}), _void(), {
|
|
49783
|
+
kind: "mutation",
|
|
49784
|
+
auth: "protected"
|
|
49785
|
+
}),
|
|
49786
|
+
setRepeat: method(object({
|
|
49787
|
+
deviceId: number().int().nonnegative(),
|
|
49788
|
+
repeat: MediaPlayerRepeatSchema
|
|
49789
|
+
}), _void(), {
|
|
49790
|
+
kind: "mutation",
|
|
49791
|
+
auth: "protected"
|
|
49792
|
+
}),
|
|
49793
|
+
selectSource: method(object({
|
|
49794
|
+
deviceId: number().int().nonnegative(),
|
|
49795
|
+
source: string().min(1)
|
|
49796
|
+
}), _void(), {
|
|
49797
|
+
kind: "mutation",
|
|
49798
|
+
auth: "protected"
|
|
49799
|
+
}),
|
|
49800
|
+
playMedia: method(object({
|
|
49801
|
+
deviceId: number().int().nonnegative(),
|
|
49802
|
+
/** Media identifier / URL. */
|
|
49803
|
+
mediaId: string().min(1),
|
|
49804
|
+
/** Media kind (`music`, `tvshow`, `movie`, `app`, …) — provider
|
|
49805
|
+
* passes it through to the upstream service. */
|
|
49806
|
+
mediaType: string().min(1)
|
|
49807
|
+
}), _void(), {
|
|
49808
|
+
kind: "mutation",
|
|
49809
|
+
auth: "protected"
|
|
49810
|
+
})
|
|
49811
|
+
},
|
|
49812
|
+
status: {
|
|
49813
|
+
schema: MediaPlayerStatusSchema,
|
|
49814
|
+
kind: "push"
|
|
49815
|
+
},
|
|
49816
|
+
/**
|
|
49817
|
+
* Runtime-state slice — mirrored by the kernel. UI players read the
|
|
49818
|
+
* full slice for live now-playing, volume, and progress updates
|
|
49819
|
+
* without polling.
|
|
49820
|
+
*/
|
|
49821
|
+
runtimeState: MediaPlayerStatusSchema,
|
|
49822
|
+
/**
|
|
49823
|
+
* Runtime-state durability: **session** — a restored transport position describes a playback that stopped when the hub did.
|
|
49824
|
+
*
|
|
49825
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
49826
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
49827
|
+
*/
|
|
49828
|
+
durability: "session",
|
|
49829
|
+
/**
|
|
49830
|
+
* History (D850): volume (a level an operator or an automation sets; the
|
|
49831
|
+
* default 10 s floor folds a slider drag into its end value) and mute.
|
|
49832
|
+
* `position` is not recorded: it moves continuously while playing.
|
|
49833
|
+
*/
|
|
49834
|
+
history: { fields: {
|
|
49835
|
+
volumeLevel: {
|
|
49836
|
+
kind: "gauge",
|
|
49837
|
+
unit: "%",
|
|
49838
|
+
deadband: 1
|
|
49839
|
+
},
|
|
49840
|
+
isMuted: { kind: "boolean" }
|
|
49841
|
+
} }
|
|
49842
|
+
};
|
|
49534
49843
|
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Heater, DeviceType.Dryer, DeviceType.Gateway, DeviceType.Camera, DeviceType.Fan, DeviceType.Lock, DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Gateway, DeviceType.Hub, DeviceType.Camera, DeviceType.Sensor, DeviceType.MediaPlayer, DeviceType.Vacuum, DeviceType.Generic, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.PetFountain, DeviceType.Fan, DeviceType.Humidifier, DeviceType.Climate, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder, DeviceType.Heater;
|
|
49535
49844
|
var NUMBER = {
|
|
49536
49845
|
kind: "fixed",
|
|
@@ -58284,214 +58593,6 @@ var LoginMethodContributionSchema = discriminatedUnion("kind", [
|
|
|
58284
58593
|
]);
|
|
58285
58594
|
method(_void(), array(LoginMethodContributionSchema).readonly());
|
|
58286
58595
|
/**
|
|
58287
|
-
* Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
|
|
58288
|
-
* Apple TV, Spotify, Roku, generic OTT receivers, …) on
|
|
58289
|
-
* `DeviceType.MediaPlayer`. Disjoint from the camera streaming
|
|
58290
|
-
* surface — those use `DeviceType.Camera` + the broker pipeline.
|
|
58291
|
-
*
|
|
58292
|
-
* The cap declares a wide method surface; not every backend supports
|
|
58293
|
-
* every method. Drivers signal sub-capability via the
|
|
58294
|
-
* `DeviceFeature.MediaPlayerXxx` flags (paired one-to-one with the
|
|
58295
|
-
* corresponding method) so the UI gates buttons without a slice
|
|
58296
|
-
* fetch — same pattern as `PanTiltZoom` for cameras.
|
|
58297
|
-
*/
|
|
58298
|
-
var MediaPlayerStateSchema = _enum([
|
|
58299
|
-
"off",
|
|
58300
|
-
"on",
|
|
58301
|
-
"idle",
|
|
58302
|
-
"playing",
|
|
58303
|
-
"paused",
|
|
58304
|
-
"buffering",
|
|
58305
|
-
"standby"
|
|
58306
|
-
]);
|
|
58307
|
-
var MediaPlayerRepeatSchema = _enum([
|
|
58308
|
-
"off",
|
|
58309
|
-
"all",
|
|
58310
|
-
"one"
|
|
58311
|
-
]);
|
|
58312
|
-
var MediaInfoSchema = object({
|
|
58313
|
-
/** Free-form media kind (`music`, `tvshow`, `movie`, `app`, `channel`,
|
|
58314
|
-
* `podcast`, …). */
|
|
58315
|
-
type: string(),
|
|
58316
|
-
/** Human-readable title. */
|
|
58317
|
-
title: string(),
|
|
58318
|
-
/** Optional artist / channel / station label. */
|
|
58319
|
-
artist: string().optional(),
|
|
58320
|
-
/** Optional album / season / show name. */
|
|
58321
|
-
album: string().optional(),
|
|
58322
|
-
/** Optional cover-art / thumbnail URL. */
|
|
58323
|
-
imageUrl: string().optional()
|
|
58324
|
-
});
|
|
58325
|
-
/**
|
|
58326
|
-
* Where `state`, `volumeLevel`, `isMuted` and `source` come from. `reported`:
|
|
58327
|
-
* the device said so. `assumed`: the driver has no feedback (infrared) and
|
|
58328
|
-
* tracks what it last SENT; it moves only after a send was accepted, and a
|
|
58329
|
-
* human at the real remote makes it wrong. A UI shows an assumed value as a
|
|
58330
|
-
* guess, never as a reading.
|
|
58331
|
-
*/
|
|
58332
|
-
var MediaPlayerStateSourceSchema = _enum(["reported", "assumed"]);
|
|
58333
|
-
/** The fields of a media-player status a driver can only guess. */
|
|
58334
|
-
var MediaPlayerAssumedFieldSchema = _enum([
|
|
58335
|
-
"state",
|
|
58336
|
-
"volumeLevel",
|
|
58337
|
-
"isMuted",
|
|
58338
|
-
"source"
|
|
58339
|
-
]);
|
|
58340
|
-
var MediaPlayerStatusSchema = object({
|
|
58341
|
-
/** Playback lifecycle state. */
|
|
58342
|
-
state: MediaPlayerStateSchema,
|
|
58343
|
-
/**
|
|
58344
|
-
* Whether the state fields are readings or the driver's own bookkeeping.
|
|
58345
|
-
* A slice written before this field existed parses as `reported`.
|
|
58346
|
-
*/
|
|
58347
|
-
stateSource: MediaPlayerStateSourceSchema.default("reported"),
|
|
58348
|
-
/**
|
|
58349
|
-
* Which fields are the driver's own guess. `stateSource` is `assumed` when
|
|
58350
|
-
* this is not empty; a field not listed here is a reading even then (power
|
|
58351
|
-
* from a running-state source, mute guessed from the last send).
|
|
58352
|
-
*/
|
|
58353
|
-
assumedFields: array(MediaPlayerAssumedFieldSchema).default([]),
|
|
58354
|
-
/** Volume as 0..100 inclusive. Null when the device has no volume
|
|
58355
|
-
* surface. Pair with `DeviceFeature.MediaPlayerVolume`. */
|
|
58356
|
-
volumeLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
58357
|
-
/** Mute toggle distinct from volume=0. Null when no mute surface.
|
|
58358
|
-
* Pair with `DeviceFeature.MediaPlayerMute`. */
|
|
58359
|
-
isMuted: boolean().nullable(),
|
|
58360
|
-
/** Active source / input. Empty when no source surface. */
|
|
58361
|
-
source: string(),
|
|
58362
|
-
/** Selectable sources. Empty when no source surface.
|
|
58363
|
-
* Pair with `DeviceFeature.MediaPlayerSelectSource`. */
|
|
58364
|
-
availableSources: array(string()),
|
|
58365
|
-
/** Currently-playing media info. Null when nothing is playing. */
|
|
58366
|
-
currentMedia: MediaInfoSchema.nullable(),
|
|
58367
|
-
/** Current playback position in ms. Null when not seekable or
|
|
58368
|
-
* nothing is playing. Pair with `DeviceFeature.MediaPlayerSeek`. */
|
|
58369
|
-
position: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
|
|
58370
|
-
/** Total duration of the current media in ms. Null when unknown
|
|
58371
|
-
* (live stream) or nothing is playing. */
|
|
58372
|
-
duration: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
|
|
58373
|
-
/** Shuffle toggle. Null when no shuffle surface.
|
|
58374
|
-
* Pair with `DeviceFeature.MediaPlayerShuffle`. */
|
|
58375
|
-
shuffle: boolean().nullable(),
|
|
58376
|
-
/** Repeat mode. Null when no repeat surface.
|
|
58377
|
-
* Pair with `DeviceFeature.MediaPlayerRepeat`. */
|
|
58378
|
-
repeat: MediaPlayerRepeatSchema.nullable(),
|
|
58379
|
-
/** Ms epoch when the slice was last updated. */
|
|
58380
|
-
lastChangedAt: number()
|
|
58381
|
-
});
|
|
58382
|
-
var mediaPlayerCapability = {
|
|
58383
|
-
name: "media-player",
|
|
58384
|
-
scope: "device",
|
|
58385
|
-
deviceNative: true,
|
|
58386
|
-
mode: "singleton",
|
|
58387
|
-
deviceTypes: [DeviceType.MediaPlayer],
|
|
58388
|
-
methods: {
|
|
58389
|
-
play: method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
58390
|
-
kind: "mutation",
|
|
58391
|
-
auth: "protected"
|
|
58392
|
-
}),
|
|
58393
|
-
pause: method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
58394
|
-
kind: "mutation",
|
|
58395
|
-
auth: "protected"
|
|
58396
|
-
}),
|
|
58397
|
-
stop: method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
58398
|
-
kind: "mutation",
|
|
58399
|
-
auth: "protected"
|
|
58400
|
-
}),
|
|
58401
|
-
next: method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
58402
|
-
kind: "mutation",
|
|
58403
|
-
auth: "protected"
|
|
58404
|
-
}),
|
|
58405
|
-
previous: method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
58406
|
-
kind: "mutation",
|
|
58407
|
-
auth: "protected"
|
|
58408
|
-
}),
|
|
58409
|
-
seek: method(object({
|
|
58410
|
-
deviceId: number().int().nonnegative(),
|
|
58411
|
-
position: number().int().nonnegative()
|
|
58412
|
-
}), _void(), {
|
|
58413
|
-
kind: "mutation",
|
|
58414
|
-
auth: "protected"
|
|
58415
|
-
}),
|
|
58416
|
-
setVolume: method(object({
|
|
58417
|
-
deviceId: number().int().nonnegative(),
|
|
58418
|
-
volumeLevel: number().min(0).max(100)
|
|
58419
|
-
}), _void(), {
|
|
58420
|
-
kind: "mutation",
|
|
58421
|
-
auth: "protected"
|
|
58422
|
-
}),
|
|
58423
|
-
setMute: method(object({
|
|
58424
|
-
deviceId: number().int().nonnegative(),
|
|
58425
|
-
muted: boolean()
|
|
58426
|
-
}), _void(), {
|
|
58427
|
-
kind: "mutation",
|
|
58428
|
-
auth: "protected"
|
|
58429
|
-
}),
|
|
58430
|
-
setShuffle: method(object({
|
|
58431
|
-
deviceId: number().int().nonnegative(),
|
|
58432
|
-
shuffle: boolean()
|
|
58433
|
-
}), _void(), {
|
|
58434
|
-
kind: "mutation",
|
|
58435
|
-
auth: "protected"
|
|
58436
|
-
}),
|
|
58437
|
-
setRepeat: method(object({
|
|
58438
|
-
deviceId: number().int().nonnegative(),
|
|
58439
|
-
repeat: MediaPlayerRepeatSchema
|
|
58440
|
-
}), _void(), {
|
|
58441
|
-
kind: "mutation",
|
|
58442
|
-
auth: "protected"
|
|
58443
|
-
}),
|
|
58444
|
-
selectSource: method(object({
|
|
58445
|
-
deviceId: number().int().nonnegative(),
|
|
58446
|
-
source: string().min(1)
|
|
58447
|
-
}), _void(), {
|
|
58448
|
-
kind: "mutation",
|
|
58449
|
-
auth: "protected"
|
|
58450
|
-
}),
|
|
58451
|
-
playMedia: method(object({
|
|
58452
|
-
deviceId: number().int().nonnegative(),
|
|
58453
|
-
/** Media identifier / URL. */
|
|
58454
|
-
mediaId: string().min(1),
|
|
58455
|
-
/** Media kind (`music`, `tvshow`, `movie`, `app`, …) — provider
|
|
58456
|
-
* passes it through to the upstream service. */
|
|
58457
|
-
mediaType: string().min(1)
|
|
58458
|
-
}), _void(), {
|
|
58459
|
-
kind: "mutation",
|
|
58460
|
-
auth: "protected"
|
|
58461
|
-
})
|
|
58462
|
-
},
|
|
58463
|
-
status: {
|
|
58464
|
-
schema: MediaPlayerStatusSchema,
|
|
58465
|
-
kind: "push"
|
|
58466
|
-
},
|
|
58467
|
-
/**
|
|
58468
|
-
* Runtime-state slice — mirrored by the kernel. UI players read the
|
|
58469
|
-
* full slice for live now-playing, volume, and progress updates
|
|
58470
|
-
* without polling.
|
|
58471
|
-
*/
|
|
58472
|
-
runtimeState: MediaPlayerStatusSchema,
|
|
58473
|
-
/**
|
|
58474
|
-
* Runtime-state durability: **session** — a restored transport position describes a playback that stopped when the hub did.
|
|
58475
|
-
*
|
|
58476
|
-
* See `RuntimeStateDurability`. Enforced by
|
|
58477
|
-
* `scripts/check-runtime-state-durability.ts`.
|
|
58478
|
-
*/
|
|
58479
|
-
durability: "session",
|
|
58480
|
-
/**
|
|
58481
|
-
* History (D850): volume (a level an operator or an automation sets; the
|
|
58482
|
-
* default 10 s floor folds a slider drag into its end value) and mute.
|
|
58483
|
-
* `position` is not recorded: it moves continuously while playing.
|
|
58484
|
-
*/
|
|
58485
|
-
history: { fields: {
|
|
58486
|
-
volumeLevel: {
|
|
58487
|
-
kind: "gauge",
|
|
58488
|
-
unit: "%",
|
|
58489
|
-
deadband: 1
|
|
58490
|
-
},
|
|
58491
|
-
isMuted: { kind: "boolean" }
|
|
58492
|
-
} }
|
|
58493
|
-
};
|
|
58494
|
-
/**
|
|
58495
58596
|
* mesh-network — collection cap for mesh-VPN providers.
|
|
58496
58597
|
*
|
|
58497
58598
|
* Different shape from `network-access` (public tunnels):
|
|
@@ -67250,6 +67351,21 @@ var NcTemplateVarKindSchema = _enum([
|
|
|
67250
67351
|
"sound",
|
|
67251
67352
|
"system"
|
|
67252
67353
|
]);
|
|
67354
|
+
/**
|
|
67355
|
+
* The default title/body a rule of one SITUATION is delivered with when the
|
|
67356
|
+
* operator wrote no template — served so an editor can pre-fill it (and the
|
|
67357
|
+
* operator can rebuild it from placeholders) instead of starting from a blank
|
|
67358
|
+
* box that, once saved, silently replaces it. `id` names the situation inside
|
|
67359
|
+
* a rule `kind`: `appliance-cycle` is a `sensor` rule whose device is an
|
|
67360
|
+
* appliance finishing a cycle. Texts are raw templates (`{{var}}` intact), in
|
|
67361
|
+
* the hub's current language and with its overrides applied.
|
|
67362
|
+
*/
|
|
67363
|
+
var NcTemplateDefaultSchema = object({
|
|
67364
|
+
id: _enum(["appliance-cycle"]),
|
|
67365
|
+
kind: NcRuleKindSchema,
|
|
67366
|
+
title: string(),
|
|
67367
|
+
body: string()
|
|
67368
|
+
});
|
|
67253
67369
|
/** Which producer renders a template: an ordinary rule, a timelapse, a digest. */
|
|
67254
67370
|
var NcTemplateFamilySchema = _enum([
|
|
67255
67371
|
"rule",
|
|
@@ -68105,7 +68221,11 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
68105
68221
|
}), method(object({}), object({
|
|
68106
68222
|
catalog: array(NcConditionDescriptorSchema),
|
|
68107
68223
|
taxonomy: NcTaxonomySchema.optional()
|
|
68108
|
-
})), method(object({}), object({
|
|
68224
|
+
})), method(object({}), object({
|
|
68225
|
+
vars: array(NcTemplateVarDescriptorSchema),
|
|
68226
|
+
/** Per-situation default texts; absent on a hub that predates them. */
|
|
68227
|
+
defaults: array(NcTemplateDefaultSchema)
|
|
68228
|
+
})), method(NcTemplatePreviewInputSchema, NcTemplatePreviewSchema, {
|
|
68109
68229
|
kind: "mutation",
|
|
68110
68230
|
access: "view"
|
|
68111
68231
|
}), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" }), method(object({}), NcRuleLastRunsSchema, { auth: "admin" }), method(object({ artifactId: string().min(1) }), object({ url: string().nullable() }), { auth: "admin" }), method(object({}), object({ snoozes: array(NcSnoozeSchema) }), { caller: "required" }), method(object({ snooze: NcSnoozeInputSchema }), object({ snooze: NcSnoozeSchema }), {
|
|
@@ -74273,7 +74393,13 @@ var RemoteMediaCommandSchema = _enum([
|
|
|
74273
74393
|
"next",
|
|
74274
74394
|
"previous",
|
|
74275
74395
|
"setMute",
|
|
74276
|
-
"selectSource"
|
|
74396
|
+
"selectSource",
|
|
74397
|
+
"turnOn",
|
|
74398
|
+
"turnOff",
|
|
74399
|
+
"volumeUp",
|
|
74400
|
+
"volumeDown",
|
|
74401
|
+
"channelUp",
|
|
74402
|
+
"channelDown"
|
|
74277
74403
|
]);
|
|
74278
74404
|
/** A send result, or `not-routed`: the role is not bound, so the native cap answers. */
|
|
74279
74405
|
var RemoteMediaCommandResultSchema = discriminatedUnion("status", [...RemoteSendResultSchema.options, object({ status: literal("not-routed") })]);
|
|
@@ -74294,7 +74420,7 @@ method(deviceInput, RemoteConfigSchema, { auth: "admin" }), method(deviceInput.e
|
|
|
74294
74420
|
}), RemoteSendResultSchema, {
|
|
74295
74421
|
kind: "mutation",
|
|
74296
74422
|
auth: "protected"
|
|
74297
|
-
}), method(deviceInput.extend({
|
|
74423
|
+
}), method(deviceInput, MediaPlayerStatusSchema.nullable(), { auth: "protected" }), method(deviceInput.extend({
|
|
74298
74424
|
command: RemoteMediaCommandSchema,
|
|
74299
74425
|
muted: boolean().optional(),
|
|
74300
74426
|
source: string().optional(),
|
|
@@ -76548,7 +76674,11 @@ listSignals: method(_void(), array(StreamSignalSchema).readonly()) }
|
|
|
76548
76674
|
* `getSettingsUISchema()` surface.
|
|
76549
76675
|
*/
|
|
76550
76676
|
var SwitchStatusSchema = object({
|
|
76551
|
-
|
|
76677
|
+
/**
|
|
76678
|
+
* `null` = the device has never reported its state (a measurement that
|
|
76679
|
+
* has not happened is unknown, never `false`).
|
|
76680
|
+
*/
|
|
76681
|
+
on: boolean().nullable().meta({ label: "On" }),
|
|
76552
76682
|
/** Ms epoch of the last state change. Useful for UI "X minutes ago". */
|
|
76553
76683
|
lastChangedAt: number()
|
|
76554
76684
|
});
|
|
@@ -76573,7 +76703,7 @@ var switchCapability = {
|
|
|
76573
76703
|
}) },
|
|
76574
76704
|
events: { onStateChanged: { data: object({
|
|
76575
76705
|
deviceId: number(),
|
|
76576
|
-
on: boolean(),
|
|
76706
|
+
on: boolean().nullable(),
|
|
76577
76707
|
lastChangedAt: number()
|
|
76578
76708
|
}) } },
|
|
76579
76709
|
status: {
|
|
@@ -80256,6 +80386,7 @@ function buildDescriptor(capName, kind) {
|
|
|
80256
80386
|
* contributes one entry per bound cap present in this map.
|
|
80257
80387
|
*/
|
|
80258
80388
|
var EVENT_KIND_BY_CAP = Object.freeze(Object.fromEntries(Object.entries(CAP_TO_KIND).map(([capName, kind]) => [capName, buildDescriptor(capName, kind)])));
|
|
80389
|
+
DeviceFeature.MediaPlayerPower, DeviceFeature.MediaPlayerVolumeStep, DeviceFeature.MediaPlayerChannelStep, DeviceFeature.MediaPlayerMute, DeviceFeature.MediaPlayerStop, DeviceFeature.MediaPlayerNext, DeviceFeature.MediaPlayerPrevious;
|
|
80259
80390
|
var btn = (idSuffix, row, col, init) => ({
|
|
80260
80391
|
idSuffix,
|
|
80261
80392
|
row,
|
|
@@ -86471,6 +86602,20 @@ Object.freeze({
|
|
|
86471
86602
|
access: "view",
|
|
86472
86603
|
role: "admin"
|
|
86473
86604
|
},
|
|
86605
|
+
"mediaPlayer.channelDown": {
|
|
86606
|
+
capName: "media-player",
|
|
86607
|
+
capScope: "device",
|
|
86608
|
+
addonId: null,
|
|
86609
|
+
access: "create",
|
|
86610
|
+
role: "viewer"
|
|
86611
|
+
},
|
|
86612
|
+
"mediaPlayer.channelUp": {
|
|
86613
|
+
capName: "media-player",
|
|
86614
|
+
capScope: "device",
|
|
86615
|
+
addonId: null,
|
|
86616
|
+
access: "create",
|
|
86617
|
+
role: "viewer"
|
|
86618
|
+
},
|
|
86474
86619
|
"mediaPlayer.getStatus": {
|
|
86475
86620
|
capName: "media-player",
|
|
86476
86621
|
capScope: "device",
|
|
@@ -86562,6 +86707,34 @@ Object.freeze({
|
|
|
86562
86707
|
access: "create",
|
|
86563
86708
|
role: "viewer"
|
|
86564
86709
|
},
|
|
86710
|
+
"mediaPlayer.turnOff": {
|
|
86711
|
+
capName: "media-player",
|
|
86712
|
+
capScope: "device",
|
|
86713
|
+
addonId: null,
|
|
86714
|
+
access: "create",
|
|
86715
|
+
role: "viewer"
|
|
86716
|
+
},
|
|
86717
|
+
"mediaPlayer.turnOn": {
|
|
86718
|
+
capName: "media-player",
|
|
86719
|
+
capScope: "device",
|
|
86720
|
+
addonId: null,
|
|
86721
|
+
access: "create",
|
|
86722
|
+
role: "viewer"
|
|
86723
|
+
},
|
|
86724
|
+
"mediaPlayer.volumeDown": {
|
|
86725
|
+
capName: "media-player",
|
|
86726
|
+
capScope: "device",
|
|
86727
|
+
addonId: null,
|
|
86728
|
+
access: "create",
|
|
86729
|
+
role: "viewer"
|
|
86730
|
+
},
|
|
86731
|
+
"mediaPlayer.volumeUp": {
|
|
86732
|
+
capName: "media-player",
|
|
86733
|
+
capScope: "device",
|
|
86734
|
+
addonId: null,
|
|
86735
|
+
access: "create",
|
|
86736
|
+
role: "viewer"
|
|
86737
|
+
},
|
|
86565
86738
|
"meshNetwork.getStatus": {
|
|
86566
86739
|
capName: "mesh-network",
|
|
86567
86740
|
capScope: "system",
|
|
@@ -90118,6 +90291,13 @@ Object.freeze({
|
|
|
90118
90291
|
access: "create",
|
|
90119
90292
|
role: "admin"
|
|
90120
90293
|
},
|
|
90294
|
+
"remote.getAssumedStatus": {
|
|
90295
|
+
capName: "remote",
|
|
90296
|
+
capScope: "system",
|
|
90297
|
+
addonId: null,
|
|
90298
|
+
access: "view",
|
|
90299
|
+
role: "admin"
|
|
90300
|
+
},
|
|
90121
90301
|
"remote.getConfig": {
|
|
90122
90302
|
capName: "remote",
|
|
90123
90303
|
capScope: "system",
|
|
@@ -93795,6 +93975,16 @@ Object.freeze({
|
|
|
93795
93975
|
form: "single",
|
|
93796
93976
|
optional: true
|
|
93797
93977
|
}],
|
|
93978
|
+
"mediaPlayer.channelDown": [{
|
|
93979
|
+
name: "deviceId",
|
|
93980
|
+
form: "single",
|
|
93981
|
+
optional: false
|
|
93982
|
+
}],
|
|
93983
|
+
"mediaPlayer.channelUp": [{
|
|
93984
|
+
name: "deviceId",
|
|
93985
|
+
form: "single",
|
|
93986
|
+
optional: false
|
|
93987
|
+
}],
|
|
93798
93988
|
"mediaPlayer.getStatus": [{
|
|
93799
93989
|
name: "deviceId",
|
|
93800
93990
|
form: "single",
|
|
@@ -93860,6 +94050,26 @@ Object.freeze({
|
|
|
93860
94050
|
form: "single",
|
|
93861
94051
|
optional: false
|
|
93862
94052
|
}],
|
|
94053
|
+
"mediaPlayer.turnOff": [{
|
|
94054
|
+
name: "deviceId",
|
|
94055
|
+
form: "single",
|
|
94056
|
+
optional: false
|
|
94057
|
+
}],
|
|
94058
|
+
"mediaPlayer.turnOn": [{
|
|
94059
|
+
name: "deviceId",
|
|
94060
|
+
form: "single",
|
|
94061
|
+
optional: false
|
|
94062
|
+
}],
|
|
94063
|
+
"mediaPlayer.volumeDown": [{
|
|
94064
|
+
name: "deviceId",
|
|
94065
|
+
form: "single",
|
|
94066
|
+
optional: false
|
|
94067
|
+
}],
|
|
94068
|
+
"mediaPlayer.volumeUp": [{
|
|
94069
|
+
name: "deviceId",
|
|
94070
|
+
form: "single",
|
|
94071
|
+
optional: false
|
|
94072
|
+
}],
|
|
93863
94073
|
"meter.getStatus": [{
|
|
93864
94074
|
name: "deviceId",
|
|
93865
94075
|
form: "single",
|
|
@@ -95025,6 +95235,11 @@ Object.freeze({
|
|
|
95025
95235
|
form: "single",
|
|
95026
95236
|
optional: true
|
|
95027
95237
|
}],
|
|
95238
|
+
"remote.getAssumedStatus": [{
|
|
95239
|
+
name: "deviceId",
|
|
95240
|
+
form: "single",
|
|
95241
|
+
optional: false
|
|
95242
|
+
}],
|
|
95028
95243
|
"remote.getConfig": [{
|
|
95029
95244
|
name: "deviceId",
|
|
95030
95245
|
form: "single",
|
|
@@ -96544,6 +96759,7 @@ var STATE_SUMMARY_VARS = [
|
|
|
96544
96759
|
[...RULE_TEXT],
|
|
96545
96760
|
([...RULE_TEXT], [...DEVICE_EVENTS]),
|
|
96546
96761
|
([...RULE_TEXT], [...COMBINED_ALARM]),
|
|
96762
|
+
([...RULE_TEXT], [...COMBINED_ALARM]),
|
|
96547
96763
|
([...RULE_TEXT], [...DEVICE_EVENTS]),
|
|
96548
96764
|
([...RULE_TEXT], [...BATTERY, ...CONSUMABLE]),
|
|
96549
96765
|
([...RULE_TEXT], [...CONSUMABLE]),
|
|
@@ -97447,7 +97663,7 @@ object({
|
|
|
97447
97663
|
* short-circuits any cap the calling process already provides.
|
|
97448
97664
|
*/
|
|
97449
97665
|
/** The addon that owns the import direction, and every `ha_*` broker. */
|
|
97450
|
-
var HA_PROVIDER_ADDON_ID = "provider-homeassistant";
|
|
97666
|
+
var HA_PROVIDER_ADDON_ID$1 = "provider-homeassistant";
|
|
97451
97667
|
/** The `BrokerInfo.kind` tag the Home Assistant provider stamps. */
|
|
97452
97668
|
var HA_BROKER_KIND = "home-assistant";
|
|
97453
97669
|
/**
|
|
@@ -97461,5 +97677,53 @@ var HA_BROKER_KIND = "home-assistant";
|
|
|
97461
97677
|
async function listHomeAssistantBrokers(query) {
|
|
97462
97678
|
return (await query({})).filter((broker) => broker.kind === HA_BROKER_KIND);
|
|
97463
97679
|
}
|
|
97680
|
+
function haInstanceSettingsPortsOver(api) {
|
|
97681
|
+
const listInstances = async () => {
|
|
97682
|
+
const all = await api.list.query();
|
|
97683
|
+
const rows = [];
|
|
97684
|
+
for (const integration of all) {
|
|
97685
|
+
if (integration.addonId !== "provider-homeassistant") continue;
|
|
97686
|
+
const settings = await api.getSettings.query({ id: integration.id });
|
|
97687
|
+
const brokerId = settings["brokerId"];
|
|
97688
|
+
rows.push({
|
|
97689
|
+
integrationId: integration.id,
|
|
97690
|
+
brokerId: typeof brokerId === "string" && brokerId.length > 0 ? brokerId : null,
|
|
97691
|
+
settings
|
|
97692
|
+
});
|
|
97693
|
+
}
|
|
97694
|
+
return rows;
|
|
97695
|
+
};
|
|
97696
|
+
return {
|
|
97697
|
+
listInstances,
|
|
97698
|
+
patchInstanceSettings: async (integrationId, patch) => {
|
|
97699
|
+
if (!(await api.list.query()).some((i) => i.id === integrationId && i.addonId === "provider-homeassistant")) return false;
|
|
97700
|
+
const stored = await api.getSettings.query({ id: integrationId });
|
|
97701
|
+
await api.setSettings.mutate({
|
|
97702
|
+
id: integrationId,
|
|
97703
|
+
settings: {
|
|
97704
|
+
...stored,
|
|
97705
|
+
...patch
|
|
97706
|
+
},
|
|
97707
|
+
skipRestart: true
|
|
97708
|
+
});
|
|
97709
|
+
return true;
|
|
97710
|
+
}
|
|
97711
|
+
};
|
|
97712
|
+
}
|
|
97713
|
+
/** The brokerId → settings view of the instances: what a reader keeps per broker. */
|
|
97714
|
+
function settingsByBroker(rows) {
|
|
97715
|
+
const out = /* @__PURE__ */ new Map();
|
|
97716
|
+
for (const row of rows) if (row.brokerId !== null) out.set(row.brokerId, row.settings);
|
|
97717
|
+
return out;
|
|
97718
|
+
}
|
|
97719
|
+
/** Read the instances, or report why not and answer nothing (a reader falls back to the legacy key). */
|
|
97720
|
+
async function listInstancesOrNothing(ports, onError) {
|
|
97721
|
+
try {
|
|
97722
|
+
return await ports.listInstances();
|
|
97723
|
+
} catch (err) {
|
|
97724
|
+
onError(errMsg(err));
|
|
97725
|
+
return [];
|
|
97726
|
+
}
|
|
97727
|
+
}
|
|
97464
97728
|
//#endregion
|
|
97465
|
-
export {
|
|
97729
|
+
export { fanControlCapability as $, nodePin as $t, bestLocationMatch as A, scriptRunnerCapability as At, climateControlCapability as B, valveCapability as Bt, accessoriesCapability as C, quantityFromUnit as Ct, ambientLightSensorCapability as D, runningFromMediaPlayer as Dt, alarmPanelCapability as E, runningFromLawnMower as Et, buildAddonRouteProvider as F, temperatureSensorCapability as Ft, contactCapability as G, RecordSecretUnavailableError as Gt, connectivityCapability as H, waterHeaterCapability as Ht, buildDeviceAdminUrl as I, tryConvertDelta as It, deviceAdminLinkCapability as J, defineAddonMigrations as Jt, controlCapability as K, baseUnitOf as Kt, buttonCapability as L, tryConvertUnit as Lt, boardKeySourceCapability as M, smokeCapability as Mt, brightnessCapability as N, switchCapability as Nt, automationControlCapability as O, runningFromVacuumState as Ot, brokerCapability as P, tamperCapability as Pt, eventEmitterCapability as Q, isReadingQuantity as Qt, calendarSourceCapability as R, updateCapability as Rt, TargetSchema as S, publicEndpointReaderFrom as St, airQualitySensorCapability as T, runExportedAction as Tt, consumableFormOf as U, weatherCapability as Ut, colorCapability as V, vibrationCapability as Vt, consumableKindOf as W, BaseAddon as Wt, deviceExportCapability as X, defineRecordKinds as Xt, deviceAdoptionCapability as Y, defineEntryKind as Yt, enumSensorCapability as Z, entryBody as Zt, FanDirectionSchema as _, preconditionOf as _t, HA_PROVIDER_ADDON_ID$1 as a, number as an, ingestReading as at, PLUG_APPLIANCE_TYPES as b, pressureSensorCapability as bt, BaseDevice as c, string as cn, mediaPlayerCapability as ct, COCO_TO_MACRO as d, url as dn, notificationOutputCapability as dt, _enum as en, floodCapability as et, CameraSwitchIdSchema as f, DeviceFeature as fn, notifierCapability as ft, EnumSensorDateTimeFormatSchema as g, EventCategory as gn, powerMeterCapability as gt, ConsumableStatusSchema as h, errMsg as hn, parseAdminBase as ht, HA_BROKER_KIND as i, literal as in, imageCapability as it, binaryCapability as j, sendToExportedTarget as jt, batteryCapability as k, runningStateCapability as kt, BaseDeviceProvider as l, union as ln, motionCapability as lt, ConsumableItemSchema as m, DeviceType as mn, oauthIntegrationCapability as mt, listInstancesOrNothing as n, boolean as nn, humidifierCapability as nt, listHomeAssistantBrokers as o, object as on, lawnMowerControlCapability as ot, ConsumableFormSchema as p, DeviceRole as pn, numericSensorCapability as pt, coverCapability as q, createEvent as qt, settingsByBroker as r, discriminatedUnion as rn, humiditySensorCapability as rt, AlarmArmModeSchema as s, record as sn, lockControlCapability as st, haInstanceSettingsPortsOver as t, array as tn, gasCapability as tt, CAMERA_SWITCH_ORDER as u, unknown as un, normalizeUnit as ut, HvacModeSchema as v, prepareNotification as vt, addonRoutesCapability as w, resolveAttachmentUrls as wt, RUNNING_STATE_COLD as x, pruneDeletedEntities as xt, MediaPlayerRepeatSchema as y, presenceCapability as yt, carbonMonoxideCapability as z, vacuumControlCapability as zt };
|