From 68e6d7d024050e914a3971de69b2e0277736b112 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Mon, 3 Apr 2017 15:04:18 -0400 Subject: [PATCH] Tweaking the apple tv sensor --- sensors/devices.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sensors/devices.yaml b/sensors/devices.yaml index 12bb735..1d39e5b 100644 --- a/sensors/devices.yaml +++ b/sensors/devices.yaml @@ -22,7 +22,14 @@ appletv: friendly_name: 'Apple Tv' - value_template: "{{ 'Online' if is_state('device_tracker.appletv', 'home') else 'Offline' }}" + value_template: >- + {%- if is_state("device_tracker.appletv", "home") %} + Online + {% elif is_state("device_tracker.appletv", "playing") %} + Playing + {% else %} + Offline + {%- endif %} xboxone: friendly_name: 'xboxone'