Skip to content

Commit

Permalink
fix templates not rendering because of "bad attribute reference" howe…
Browse files Browse the repository at this point in the history
…ver the attributes exist
  • Loading branch information
nalipaz committed Mar 30, 2018
1 parent be45d16 commit 5bbc04b
Showing 1 changed file with 76 additions and 76 deletions.
152 changes: 76 additions & 76 deletions config/packages/door_locks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3116,82 +3116,82 @@ script:
sensor:
- platform: template
sensors:
door_lock_batteries_fourth_bedroom_door:
value_template: '{{states["zwave"]["lock_4thbedroom_door"]["attributes"]["battery_level"]}}'
friendly_name: Fourth Bedroom
unit_of_measurement: '%'
icon_template: >-
{% set level = ((states["zwave"]["lock_4thbedroom_door"]["attributes"]["battery_level"]*0.1)|round)*10|int %}
mdi:battery
{%- if level > 90 -%}
{%- elif level > 70 or ( level < 31 and level > 10 ) -%}
-{{ level }}
{%- elif level > 50 -%}
-60
{%- elif level > 30 -%}
-40
{%- else -%}
-alert
{%- endif -%}
door_lock_batteries_front_door:
value_template: '{{states["zwave"]["lock_front_door"]["attributes"]["battery_level"]}}'
friendly_name: Front Door
unit_of_measurement: '%'
icon_template: >-
{% set level = ((states["zwave"]["lock_front_door"]["attributes"]["battery_level"]*0.1)|round)*10|int %}
mdi:battery
{%- if level > 90 -%}
{%- elif level > 70 or ( level < 31 and level > 10 ) -%}
-{{ level }}
{%- elif level > 50 -%}
-60
{%- elif level > 30 -%}
-40
{%- else -%}
-alert
{%- endif -%}
door_lock_batteries_garageside_door:
value_template: '{{states["zwave"]["lock_garageside_door"]["attributes"]["battery_level"]}}'
friendly_name: Garage Side Door
unit_of_measurement: '%'
icon_template: >-
{% set level = ((states["zwave"]["lock_garageside_door"]["attributes"]["battery_level"]*0.1)|round)*10|int %}
mdi:battery
{%- if level > 90 -%}
{%- elif level > 70 or ( level < 31 and level > 10 ) -%}
-{{ level }}
{%- elif level > 50 -%}
-60
{%- elif level > 30 -%}
-40
{%- else -%}
-alert
{%- endif -%}
door_lock_batteries_rear_door:
value_template: '{{states["zwave"]["lock_rear_door"]["attributes"]["battery_level"]}}'
friendly_name: Rear Door
unit_of_measurement: '%'
icon_template: >-
{% set level = ((states["zwave"]["lock_rear_door"]["attributes"]["battery_level"]*0.1)|round)*10|int %}
mdi:battery
{%- if level > 90 -%}
{%- elif level > 70 or ( level < 31 and level > 10 ) -%}
-{{ level }}
{%- elif level > 50 -%}
-60
{%- elif level > 30 -%}
-40
{%- else -%}
-alert
{%- endif -%}
# door_lock_batteries_fourth_bedroom_door:
# value_template: '{{states["zwave"]["lock_4thbedroom_door"]["attributes"]["battery_level"]}}'
# friendly_name: Fourth Bedroom
# unit_of_measurement: '%'
# icon_template: >-
# {% set level = ((states["zwave"]["lock_4thbedroom_door"]["attributes"]["battery_level"]*0.1)|round)*10|int %}
# mdi:battery
# {%- if level > 90 -%}
#
# {%- elif level > 70 or ( level < 31 and level > 10 ) -%}
# -{{ level }}
# {%- elif level > 50 -%}
# -60
# {%- elif level > 30 -%}
# -40
# {%- else -%}
# -alert
# {%- endif -%}
#
# door_lock_batteries_front_door:
# value_template: '{{states["zwave"]["lock_front_door"]["attributes"]["battery_level"]}}'
# friendly_name: Front Door
# unit_of_measurement: '%'
# icon_template: >-
# {% set level = ((states["zwave"]["lock_front_door"]["attributes"]["battery_level"]*0.1)|round)*10|int %}
# mdi:battery
# {%- if level > 90 -%}
#
# {%- elif level > 70 or ( level < 31 and level > 10 ) -%}
# -{{ level }}
# {%- elif level > 50 -%}
# -60
# {%- elif level > 30 -%}
# -40
# {%- else -%}
# -alert
# {%- endif -%}
#
# door_lock_batteries_garageside_door:
# value_template: '{{states["zwave"]["lock_garageside_door"]["attributes"]["battery_level"]}}'
# friendly_name: Garage Side Door
# unit_of_measurement: '%'
# icon_template: >-
# {% set level = ((states["zwave"]["lock_garageside_door"]["attributes"]["battery_level"]*0.1)|round)*10|int %}
# mdi:battery
# {%- if level > 90 -%}
#
# {%- elif level > 70 or ( level < 31 and level > 10 ) -%}
# -{{ level }}
# {%- elif level > 50 -%}
# -60
# {%- elif level > 30 -%}
# -40
# {%- else -%}
# -alert
# {%- endif -%}
#
# door_lock_batteries_rear_door:
# value_template: '{{states["zwave"]["lock_rear_door"]["attributes"]["battery_level"]}}'
# friendly_name: Rear Door
# unit_of_measurement: '%'
# icon_template: >-
# {% set level = ((states["zwave"]["lock_rear_door"]["attributes"]["battery_level"]*0.1)|round)*10|int %}
# mdi:battery
# {%- if level > 90 -%}
#
# {%- elif level > 70 or ( level < 31 and level > 10 ) -%}
# -{{ level }}
# {%- elif level > 50 -%}
# -60
# {%- elif level > 30 -%}
# -40
# {%- else -%}
# -alert
# {%- endif -%}

keypad_1_temp_lock_turn_on:
friendly_name: Turn keypad 1 on
entity_id: sensor.date__time
Expand Down

0 comments on commit 5bbc04b

Please sign in to comment.