mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-13 12:26:50 +00:00
Add event to binary sensor example (#18567)
This commit is contained in:
parent
523d1b0f3b
commit
a99784324c
@ -299,6 +299,21 @@ curl --header "Content-Type: application/json" \
|
|||||||
http://homeassistant.local:8123/api/webhook/my-super-secret-webhook-id
|
http://homeassistant.local:8123/api/webhook/my-super-secret-webhook-id
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Turning an event into a binary sensor
|
||||||
|
|
||||||
|
You can use a trigger-based template entity to convert any event or other automation trigger into a binary sensor. The below configuration will turn on a binary sensor for 5 seconds when the automation trigger triggers.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
template:
|
||||||
|
trigger:
|
||||||
|
platform: event
|
||||||
|
event_type: my_event
|
||||||
|
binary_sensor:
|
||||||
|
- name: Event recently fired
|
||||||
|
auto_off: 5
|
||||||
|
state: "true"
|
||||||
|
```
|
||||||
|
|
||||||
### Sun Angle
|
### Sun Angle
|
||||||
|
|
||||||
This example shows the sun angle in the frontend.
|
This example shows the sun angle in the frontend.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user