Various tweaks, fixes and updated documentation.
This commit is contained in:
65
documentation/popups.md
Normal file
65
documentation/popups.md
Normal file
@@ -0,0 +1,65 @@
|
||||
|
||||
## Anatomy of a popup
|
||||
|
||||
```yaml
|
||||
service: browser_mod.popup
|
||||
data:
|
||||
title: The title
|
||||
content: The content
|
||||
right_button: Right button
|
||||
left_button: Left button
|
||||
```
|
||||
|
||||

|
||||
|
||||
## Displaying a dashboard card in a popup
|
||||
|
||||
```yaml
|
||||
service: browser_mod.popup
|
||||
data:
|
||||
title: The title
|
||||
right_button: Right button
|
||||
left_button: Left button
|
||||
content:
|
||||
type: entities
|
||||
entities:
|
||||
- light.bed_light
|
||||
- light.ceiling_lights
|
||||
- light.kitchen_lights
|
||||
```
|
||||
|
||||

|
||||
|
||||
## Actionable popups
|
||||
|
||||
```yaml
|
||||
service: browser_mod.popup
|
||||
data:
|
||||
content: Do you want to turn the light on?
|
||||
right_button: "Yes"
|
||||
left_button: "No"
|
||||
right_button_action:
|
||||
service: light.turn_on
|
||||
data:
|
||||
entity_id: light.bed_light
|
||||
left_button_action:
|
||||
service: browser_mod.popup
|
||||
data:
|
||||
title: Really?
|
||||
content: Are you sure?
|
||||
right_button: "Yes"
|
||||
left_button: "No"
|
||||
right_button_action:
|
||||
service: browser_mod.popup
|
||||
data:
|
||||
content: Fine, live in darkness.
|
||||
dismissable: false
|
||||
title: Ok
|
||||
timeout: 3000
|
||||
left_button_action:
|
||||
service: light.turn_on
|
||||
data:
|
||||
entity_id: light.bed_light
|
||||
```
|
||||
|
||||

|
||||
Reference in New Issue
Block a user