Improved thread safety
This commit is contained in:
31
test/automations.yaml
Normal file
31
test/automations.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
- id: "1660669793583"
|
||||
alias: Toggle bed light
|
||||
description: ""
|
||||
trigger:
|
||||
- platform: time_pattern
|
||||
seconds: /3
|
||||
condition: []
|
||||
action:
|
||||
- type: toggle
|
||||
device_id: 98861bdf58b3c79183c03be06da14f27
|
||||
entity_id: light.bed_light
|
||||
domain: light
|
||||
mode: single
|
||||
|
||||
- alias: Popup when kitchen light togggled
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: light.kitchen_lights
|
||||
action:
|
||||
- service: browser_mod.sequence
|
||||
data:
|
||||
sequence:
|
||||
- service: delay
|
||||
data:
|
||||
time: 5000
|
||||
- service: browser_mod.popup
|
||||
data:
|
||||
title: automation
|
||||
content:
|
||||
type: markdown
|
||||
content: "{%raw%}{{states('light.bed_light')}}{%endraw%}"
|
||||
@@ -1,5 +1,7 @@
|
||||
default_config:
|
||||
|
||||
automation: !include test/automations.yaml
|
||||
|
||||
demo:
|
||||
|
||||
http:
|
||||
@@ -12,6 +14,8 @@ logger:
|
||||
logs:
|
||||
custom_components.browser_mod: info
|
||||
|
||||
# debugpy:
|
||||
|
||||
# browser_mod:
|
||||
# devices:
|
||||
# camdevice:
|
||||
|
||||
@@ -32,6 +32,7 @@ views:
|
||||
action: more-info
|
||||
|
||||
- !include views/popup.yaml
|
||||
- !include views/frontend-backend.yaml
|
||||
|
||||
- title: Popup card
|
||||
popup_cards:
|
||||
|
||||
30
test/views/frontend-backend.yaml
Normal file
30
test/views/frontend-backend.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
title: frontend vs backend
|
||||
|
||||
cards:
|
||||
- type: entities
|
||||
entities:
|
||||
- light.bed_light
|
||||
- light.kitchen_lights
|
||||
|
||||
- type: button
|
||||
name: fire-dom-event
|
||||
tap_action:
|
||||
action: fire-dom-event
|
||||
browser_mod:
|
||||
service: browser_mod.popup
|
||||
data:
|
||||
title: fire-dom-event
|
||||
content:
|
||||
type: markdown
|
||||
content: "{{states('light.bed_light')}}"
|
||||
|
||||
- type: button
|
||||
name: call-service
|
||||
tap_action:
|
||||
action: call-service
|
||||
service: browser_mod.popup
|
||||
data:
|
||||
title: call-service
|
||||
content:
|
||||
type: markdown
|
||||
content: "{{states('light.bed_light')}}"
|
||||
Reference in New Issue
Block a user