-
Notifications
You must be signed in to change notification settings - Fork 188
Cookbook
Thomas Lovén edited this page Sep 4, 2022
·
10 revisions
Here are some example uses. More to come!
Please let me know if you come up with something cool!
By @scstraus
- id: popup_camera_when_human_detected
alias: Popup Camera When Human Detected
hide_entity: true
initial_state: 'true'
trigger:
platform: state
entity_id: binary_sensor.human
to: 'on'
action:
- service: browser_mod.more_info
data:
entity_id: camera.main
deviceID:
- 12345678-12345678
Browser_mod will replace this
with the current deviceID in the deviceID
field of any service call from the frontend.
That can let e.g. a script know which device called it:
scripts.yaml
test_popup:
sequence:
- service: browser_mod.popup
data_template:
deviceID: "{{ deviceID }}"
title: Testing script
card:
type: entities
entities:
- light.bed_light
Lovelace button configuration:
type: entity-button
icon: mdi:star
tap_action:
action: fire-dom-event
browser_mod:
command: call-service
service: script.test_popup
service_data:
deviceID:
- this