-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
7,387 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/.rts2_cache_cjs/ | ||
/.rts2_cache_es/ | ||
/.rts2_cache_umd/ | ||
/node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default function computeDomain(entityId: string): string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/** Constants to be used in the frontend. */ | ||
/** Icon to use when no icon specified for domain. */ | ||
export declare const DEFAULT_DOMAIN_ICON = "hass:bookmark"; | ||
/** Panel to show when no panel is picked. */ | ||
export declare const DEFAULT_PANEL = "lovelace"; | ||
/** Domains that have a state card. */ | ||
export declare const DOMAINS_WITH_CARD: string[]; | ||
/** Domains with separate more info dialog. */ | ||
export declare const DOMAINS_WITH_MORE_INFO: string[]; | ||
/** Domains that show no more info dialog. */ | ||
export declare const DOMAINS_HIDE_MORE_INFO: string[]; | ||
/** Domains that should have the history hidden in the more info dialog. */ | ||
export declare const DOMAINS_MORE_INFO_NO_HISTORY: string[]; | ||
/** States that we consider "off". */ | ||
export declare const STATES_OFF: string[]; | ||
/** Domains where we allow toggle in Lovelace. */ | ||
export declare const DOMAINS_TOGGLE: Set<string>; | ||
/** Temperature units. */ | ||
export declare const UNIT_C = "\u00B0C"; | ||
export declare const UNIT_F = "\u00B0F"; | ||
/** Entity ID of the default view. */ | ||
export declare const DEFAULT_VIEW_ENTITY_ID = "group.default_view"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
declare global { | ||
interface HASSDomEvents { | ||
} | ||
} | ||
export declare type ValidHassDomEvent = keyof HASSDomEvents; | ||
export interface HASSDomEvent<T> extends Event { | ||
detail: T; | ||
} | ||
/** | ||
* Dispatches a custom event with an optional detail value. | ||
* | ||
* @param {string} type Name of event type. | ||
* @param {*=} detail Detail value containing event-specific | ||
* payload. | ||
* @param {{ bubbles: (boolean|undefined), | ||
* cancelable: (boolean|undefined), | ||
* composed: (boolean|undefined) }=} | ||
* options Object specifying options. These may include: | ||
* `bubbles` (boolean, defaults to `true`), | ||
* `cancelable` (boolean, defaults to false), and | ||
* `node` on which to fire the event (HTMLElement, defaults to `this`). | ||
* @return {Event} The new event that was fired. | ||
*/ | ||
export declare const fireEvent: <HassEvent extends "undefined" | "haptic" | "value-changed" | "config-changed" | "hass-more-info" | "ll-rebuild" | "location-changed">(node: HTMLElement | Window, type: HassEvent, detail?: HASSDomEvents[HassEvent], options?: { | ||
bubbles?: boolean; | ||
cancelable?: boolean; | ||
composed?: boolean; | ||
}) => Event; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { HomeAssistant, ActionConfig } from "./types"; | ||
export declare const handleClick: (node: HTMLElement, hass: HomeAssistant, config: { | ||
entity?: string; | ||
camera_image?: string; | ||
hold_action?: ActionConfig; | ||
tap_action?: ActionConfig; | ||
}, hold: boolean) => void; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/** | ||
* Utility function that enables haptic feedback | ||
*/ | ||
export declare type HapticType = "success" | "warning" | "failure" | "light" | "medium" | "heavy" | "selection"; | ||
declare global { | ||
interface HASSDomEvents { | ||
haptic: HapticType; | ||
} | ||
} | ||
export declare const forwardHaptic: (el: HTMLElement, hapticType: HapticType) => void; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export * from "./compute-domain"; | ||
export * from "./const"; | ||
export * from "./fire-event"; | ||
export * from "./handle-click"; | ||
export * from "./haptic"; | ||
export * from "./navigate"; | ||
export * from "./toggle-entity"; | ||
export * from "./turn-on-off-entity"; | ||
export * from "./types"; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.