diff --git a/atom.xml b/atom.xml index 058df22e56..76b7f110ee 100644 --- a/atom.xml +++ b/atom.xml @@ -4,7 +4,7 @@
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.
+# 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: >-
+ {% 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 %}
+
+