-
-
Notifications
You must be signed in to change notification settings - Fork 505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better battery templates #184
Labels
Comments
- platform: template
sensors:
batteries_front_door_lock:
friendly_name: 'Front Door'
value_template: "{{ states.zwave.deadbolt_front_door_17.attributes.battery_level|default(-1)|int if states.zwave.deadbolt_front_door_17 is not none }}"
unit_of_measurement: '%'
icon_template: '{% if states.zwave.deadbolt_front_door_17.attributes.battery_level >= 90 %}mdi:battery{% elif states.zwave.deadbolt_front_door_17.attributes.battery_level >= 80 %}mdi:battery-80{% elif states.zwave.deadbolt_front_door_17.attributes.battery_level >= 70 %}mdi:battery-70{% elif states.zwave.deadbolt_front_door_17.attributes.battery_level >= 60 %}mdi:battery-60{% elif states.zwave.deadbolt_front_door_17.attributes.battery_level >= 50 %}mdi:battery-50{% elif states.zwave.deadbolt_front_door_17.attributes.battery_level >= 40 %}mdi:battery-40{% elif states.zwave.deadbolt_front_door_17.attributes.battery_level >= 30 %}mdi:battery-30{% elif states.zwave.deadbolt_front_door_17.attributes.battery_level >= 20 %}mdi:battery-20{% elif states.zwave.deadbolt_front_door_17.attributes.battery_level >= 10 %}mdi:battery-10{% else %}battery-outline{% endif %}'
entity_id: zwave.deadbolt_front_door_17 |
Not needed. Screw the UI.. Voice is where this House is going. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
brianjking/homeassistant-config#104
The text was updated successfully, but these errors were encountered: