mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-25 02:07:15 +00:00
Update sensor.fritzbox_callmonitor.markdown (#2685)
* Update sensor.fritzbox_callmonitor.markdown Added a configuration example for callmonitor push notifications * Update sensor.fritzbox_callmonitor.markdown Added raw/endraw as suggested by @fabaff. Elaborated notification text a bit more.
This commit is contained in:
parent
e2d68f265f
commit
d9735889a5
@ -56,3 +56,30 @@ sensor:
|
|||||||
- '+4989'
|
- '+4989'
|
||||||
- '089'
|
- '089'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### {% linkable_title Send notifications on state change %}
|
||||||
|
|
||||||
|
This example shows how to send notifications whenever the sensor's state changes. You will get notified both when you receive a call and also when a call is placed.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# Example configuration.yml entry.
|
||||||
|
automation:
|
||||||
|
- alias: "Notify about phone state"
|
||||||
|
trigger:
|
||||||
|
- platform: state
|
||||||
|
entity_id: sensor.phone
|
||||||
|
action:
|
||||||
|
- service: notify.notify
|
||||||
|
data:
|
||||||
|
title: "Phone"
|
||||||
|
message: >-
|
||||||
|
{% raw %}{% if is_state("sensor.phone", "idle") %}
|
||||||
|
Phone is idle
|
||||||
|
{% elif is_state("sensor.phone", "dialing") %}
|
||||||
|
Calling {{ states.sensor.phone.attributes.to_name }} ({{ states.sensor.phone.attributes.to }})
|
||||||
|
{% elif is_state("sensor.phone", "ringing") %}
|
||||||
|
Incoming call from {{ states.sensor.phone.attributes.from_name }} ({{ states.sensor.phone.attributes.from }})
|
||||||
|
{% else %}
|
||||||
|
Talking to {{ states.sensor.phone.attributes.with_name }} ({{ states.sensor.phone.attributes.with }})
|
||||||
|
{% endif %}{% endraw %}
|
||||||
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user