Skip to content

Commit

Permalink
fix: Support for fire-dom-event with browser-mod
Browse files Browse the repository at this point in the history
Fix #196
  • Loading branch information
RomRider committed Oct 24, 2021
1 parent 279fe85 commit 3dc9625
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .devcontainer/ui-lovelace.yaml
Expand Up @@ -1150,3 +1150,25 @@ views:
group_by:
func: avg
duration: 3min

- title: Main2
cards:
- type: custom:apexcharts-card
graph_span: 1h
header:
show: true
show_states: true
series:
- entity: sensor.random_0_1000
float_precision: 0
show:
in_header: true
group_by:
duration: 15min
func: avg
header_actions:
tap_action:
action: fire-dom-event
browser_mod:
command: toast
message: Hello, world!
1 change: 1 addition & 0 deletions src/types-config-ti.ts
Expand Up @@ -193,6 +193,7 @@ export const NoActionConfig = t.iface(["BaseActionConfig"], {
export const CustomActionConfig = t.iface(["BaseActionConfig"], {
"action": t.lit('fire-dom-event'),
"haptic": t.opt("HapticType"),
"browser_mod": t.opt("any"),
});

export const BaseActionConfig = t.iface([], {
Expand Down
2 changes: 2 additions & 0 deletions src/types-config.ts
Expand Up @@ -188,6 +188,8 @@ export interface NoActionConfig extends BaseActionConfig {
export interface CustomActionConfig extends BaseActionConfig {
action: 'fire-dom-event';
haptic?: HapticType;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
browser_mod?: any;
}
export interface BaseActionConfig {
confirmation?: ConfirmationRestrictionConfig;
Expand Down

0 comments on commit 3dc9625

Please sign in to comment.