@digital-alchemy/hass 0.3.13 → 0.3.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/dynamic.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { PICK_ENTITY } from "./helpers";
2
- export type TFloorId = "example_floor";
2
+ export type TFloorId = "example_floor" | "example_floor_2";
3
3
  export type TAreaId = "example_area" | "empty_area";
4
- export type TLabelId = "example_label";
5
- export type TDeviceId = "example_device";
4
+ export type TLabelId = "example_label" | "example_label_2";
5
+ export type TDeviceId = "example_device" | "example_device_2";
6
6
  export type TZoneId = string & {
7
7
  zone: true;
8
8
  };
@@ -142,12 +142,15 @@ export type REGISTRY_SETUP = {
142
142
  _empty_area: never;
143
143
  };
144
144
  label: {
145
+ _example_label_2: "switch.example_switch";
145
146
  _example_label: "switch.example_switch";
146
147
  };
147
148
  floor: {
149
+ _example_floor_2: "button.example_button" | "button.example_button";
148
150
  _example_floor: "button.example_button" | "button.example_button";
149
151
  };
150
152
  device: {
153
+ _example_device_2: "button.example_button" | "button.example_button";
151
154
  _example_device: "button.example_button" | "button.example_button";
152
155
  };
153
156
  };
@@ -1,5 +1,5 @@
1
1
  import { TBlackHole, TServiceParams } from "@digital-alchemy/core";
2
- import { EditLabelOptions, ENTITY_STATE, EntityHistoryDTO, EntityHistoryResult, EntityRegistryItem, PICK_ENTITY, PICK_FROM_AREA, PICK_FROM_DEVICE, PICK_FROM_FLOOR, PICK_FROM_LABEL, TAreaId } from "..";
2
+ import { EditLabelOptions, ENTITY_STATE, EntityHistoryDTO, EntityHistoryResult, EntityRegistryItem, PICK_ENTITY, PICK_FROM_AREA, PICK_FROM_DEVICE, PICK_FROM_FLOOR, PICK_FROM_LABEL, TAreaId, TDeviceId, TFloorId, TLabelId } from "..";
3
3
  export declare const ENTITY_UPDATE_RECEIVER: unique symbol;
4
4
  export type ByIdProxy<ENTITY_ID extends PICK_ENTITY> = ENTITY_STATE<ENTITY_ID> & {
5
5
  entity_id: ENTITY_ID;
@@ -26,13 +26,13 @@ export declare function EntityManager({ logger, hass, config, lifecycle, context
26
26
  */
27
27
  [ENTITY_UPDATE_RECEIVER]: <ENTITY extends PICK_ENTITY = PICK_ENTITY>(entity_id: PICK_ENTITY, new_state: ENTITY_STATE<ENTITY>, old_state: ENTITY_STATE<ENTITY>) => void;
28
28
  byArea: <AREA extends TAreaId, DOMAIN extends import("..").TRawDomains>(area: AREA, ...domains: DOMAIN[]) => PICK_FROM_AREA<AREA, DOMAIN>[];
29
- byDevice: <DEVICE extends "example_device", DOMAIN_1 extends import("..").TRawDomains>(device: DEVICE, ...domains: DOMAIN_1[]) => PICK_FROM_DEVICE<DEVICE, DOMAIN_1>[];
30
- byFloor: <FLOOR extends "example_floor", DOMAIN_2 extends import("..").TRawDomains>(floor: FLOOR, ...domains: DOMAIN_2[]) => PICK_FROM_FLOOR<FLOOR, DOMAIN_2>[];
29
+ byDevice: <DEVICE extends TDeviceId, DOMAIN_1 extends import("..").TRawDomains>(device: DEVICE, ...domains: DOMAIN_1[]) => PICK_FROM_DEVICE<DEVICE, DOMAIN_1>[];
30
+ byFloor: <FLOOR extends TFloorId, DOMAIN_2 extends import("..").TRawDomains>(floor: FLOOR, ...domains: DOMAIN_2[]) => PICK_FROM_FLOOR<FLOOR, DOMAIN_2>[];
31
31
  /**
32
32
  * Retrieves a proxy object for a specified entity. This proxy object
33
33
  * provides current values and event hooks for the entity.
34
34
  */ byId: <ENTITY_ID extends PICK_ENTITY>(entity_id: ENTITY_ID) => ByIdProxy<ENTITY_ID>;
35
- byLabel: <LABEL extends "example_label", DOMAIN_3 extends import("..").TRawDomains>(label: LABEL, ...domains: DOMAIN_3[]) => PICK_FROM_LABEL<LABEL, DOMAIN_3>[];
35
+ byLabel: <LABEL extends TLabelId, DOMAIN_3 extends import("..").TRawDomains>(label: LABEL, ...domains: DOMAIN_3[]) => PICK_FROM_LABEL<LABEL, DOMAIN_3>[];
36
36
  /**
37
37
  * Lists all entities within a specified domain. This is useful for
38
38
  * domain-specific operations or queries.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@digital-alchemy/hass",
3
3
  "repository": "https://github.com/Digital-Alchemy-TS/hass",
4
4
  "homepage": "https://docs.digital-alchemy.app/Hass",
5
- "version": "0.3.13",
5
+ "version": "0.3.14",
6
6
  "scripts": {
7
7
  "build": "rm -rf dist/; tsc",
8
8
  "lint": "eslint src",