Tweaking the apple tv sensor

This commit is contained in:
Jeffrey Stone 2017-04-03 15:13:13 -04:00
parent 68e6d7d024
commit 467b70d918
1 changed files with 21 additions and 7 deletions

View File

@ -23,12 +23,13 @@
appletv: appletv:
friendly_name: 'Apple Tv' friendly_name: 'Apple Tv'
value_template: >- value_template: >-
{%- if is_state("device_tracker.appletv", "home") %} {%- if is_state("media_player.appletv", "on") %}
Online On
{% elif is_state("device_tracker.appletv", "playing") %} {% elif is_state("media_player.appletv", "playing") %}
Playing Playing {%- if states.media_player.appletv.attributes.media_title %}
- {{ states.media_player.appletv.attributes.media_title }}
{% else %} {% else %}
Offline Off
{%- endif %} {%- endif %}
xboxone: xboxone:
@ -37,7 +38,14 @@
chromecast: chromecast:
friendly_name: 'Chromecast' friendly_name: 'Chromecast'
value_template: "{{ 'Online' if is_state('device_tracker.chromecast', 'home') else 'Offline' }}" value_template: >-
{%- if is_state("media_player.chromecast_lr", "on") %}
On
{% elif is_state("media_player.chromecast_lr", "playing") %}
Playing
{% else %}
Off
{%- endif %}
smartthings: smartthings:
friendly_name: 'SmartThings' friendly_name: 'SmartThings'
@ -45,7 +53,13 @@
samsungtv: samsungtv:
friendly_name: 'Samsung Tv' friendly_name: 'Samsung Tv'
value_template: "{{ 'Online' if is_state('device_tracker.c4731ecec013', 'home') else 'Offline' }}" value_template: >-
{%- if is_state("media_player.pn60e550_pn60e550", "on") %}
On
{% else %}
Off
{%- endif %}
honeywell: honeywell:
friendly_name: 'Honeywell' friendly_name: 'Honeywell'