Updated batt and garage icons to update based on state

This commit is contained in:
Jeffrey Stone 2017-04-17 11:24:22 -04:00
parent 3acbe1c65f
commit 25030bb86a
4 changed files with 3 additions and 70 deletions

View File

@ -99,7 +99,6 @@ sensor.jeff_phone_battery:
icon: mdi:battery-30
friendly_name: "Jeff's iPhone Battery"
sensor.jeff_iphone_batt:
icon: mdi:battery-30
friendly_name: "Jeff's iPhone Battery"
sensor.jeff_velocity:
icon: mdi:speedometer
@ -115,7 +114,6 @@ device_tracker.katherinesiphone:
entity_picture: !secret KAT_ICON
friendly_name: Kat
sensor.kat_iphone_batt:
icon: mdi:battery-30
friendly_name: "Kat's iPhone Battery"
device_tracker.jeffreyonestonesipad:
icon: mdi:tablet-ipad
@ -215,7 +213,6 @@ sensor.garage_door:
friendly_name: Garage Door
cover.garage_door:
icon: mdi:garage
friendly_name: Garage Door
sensor.home_to_summit:

View File

@ -1,67 +0,0 @@
- platform: template
sensors:
amazon_dot_lr:
friendly_name: 'Amazon Dot LR'
value_template: "{{ 'Online' if is_state('device_tracker.kindlecdf98981f', 'home') else 'Offline' }}"
circle:
friendly_name: 'Disney Circle'
value_template: "{{ 'Online' if is_state('device_tracker.circle', 'home') else 'Offline' }}"
tycho:
friendly_name: 'tycho'
value_template: "{{ 'Online' if is_state('device_tracker.jarvis', 'home') else 'Offline' }}"
tightbeam:
friendly_name: 'tightbeam'
value_template: "{{ 'Online' if is_state('device_tracker.tightbeam', 'home') else 'Offline' }}"
appletv:
friendly_name: 'Apple Tv'
value_template: "{{ 'Online' if is_state('device_tracker.appletv', 'home') else 'Offline' }}"
xboxone:
friendly_name: 'xboxone'
value_template: "{{ 'Online' if is_state('device_tracker.xboxone', 'home') else 'Offline' }}"
chromecast:
friendly_name: 'Chromecast'
value_template: "{{ 'Online' if is_state('device_tracker.chromecast', 'home') else 'Offline' }}"
smartthings:
friendly_name: 'SmartThings'
value_template: "{{ 'Online' if is_state('device_tracker.d052a8170fef', 'home') else 'Offline' }}"
samsungtv:
friendly_name: 'Samsung Tv'
value_template: "{{ 'Online' if is_state('device_tracker.c4731ecec013', 'home') else 'Offline' }}"
honeywell:
friendly_name: 'Honeywell'
value_template: "{{ 'Online' if is_state('device_tracker.gateway2f3bca', 'home') else 'Offline' }}"
router:
friendly_name: 'Asus Router'
value_template: "{{ 'Online' if is_state('device_tracker.routerasuscom', 'home') else 'Offline' }}"
kat_mini:
friendly_name: "Kat's Mini"
value_template: "{{ 'Online' if is_state('device_tracker.katherinesmini', 'home') else 'Offline' }}"
jeff_iphone_batt:
unit_of_measurement: '%'
value_template: >-
{%- if states.device_tracker.jeffreysiphone.attributes.battery %}
{{ states.device_tracker.jeffreysiphone.attributes.battery | round(1) }}
{% else %}
{{ states.sensor.jeff_iphone_batt.state }}
{%- endif %}
kat_iphone_batt:
unit_of_measurement: '%'
value_template: >-
{%- if states.device_tracker.katherinesiphone.attributes.battery %}
{{ states.device_tracker.katherinesiphone.attributes.battery | round(1) }}
{% else %}
{{ states.sensor.kat_iphone_batt.state }}
{%- endif %}

View File

@ -76,6 +76,7 @@
{% else %}
{{ states.sensor.jeff_iphone_batt.state }}
{%- endif %}
icon_template: '{%- if is_state("sensor.jeff_iphone_batt", "unknown") %}mdi:battery-unknown{%- elif is_state_attr("device_tracker.jeffreystonesiphone", "battery_status", "Charging") %}mdi:battery-charging{%- elif states.device_tracker.jeffreystonesiphone.attributes.battery <= 5 %}mdi:battery-outline{%- elif states.device_tracker.jeffreystonesiphone.attributes.battery >= 95 %}mdi:battery{% else %}mdi:battery-{{(states.device_tracker.jeffreystonesiphone.attributes.battery|float / 10)|round*10}}{%- endif %}'
kat_iphone_batt:
unit_of_measurement: '%'
@ -85,3 +86,4 @@
{% else %}
{{ states.sensor.kat_iphone_batt.state }}
{%- endif %}
icon_template: '{%- if is_state("sensor.sensor.kat_iphone_batt", "unknown") %}mdi:battery-unknown{%- elif is_state_attr("device_tracker.katherinesiphone", "battery_status", "Charging") %}mdi:battery-charging{%- elif states.device_tracker.katherinesiphone.attributes.battery <= 5 %}mdi:battery-outline{%- elif states.device_tracker.katherinesiphone.attributes.battery >= 95 %}mdi:battery{% else %}mdi:battery-{{(states.device_tracker.katherinesiphone.attributes.battery|float / 10)|round*10}}{%- endif %}'

View File

@ -14,3 +14,4 @@
{% else %}
Unknown
{%- endif %}
icon_template: '{%- if is_state("sensor.garage_door", "unknown") %}mdi:sync-alert{%- elif is_state("cover.garage_door", "open") %}mdi:garage-open{% else %}mdi:garage{%- endif %}'