Skip to content
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

Closed
CCOSTAN opened this issue May 16, 2017 · 2 comments
Closed

Better battery templates #184

CCOSTAN opened this issue May 16, 2017 · 2 comments

Comments

@CCOSTAN
Copy link
Owner

CCOSTAN commented May 16, 2017

brianjking/homeassistant-config#104

@CCOSTAN
Copy link
Owner Author

CCOSTAN commented May 17, 2017

- 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

@CCOSTAN
Copy link
Owner Author

CCOSTAN commented Nov 23, 2017

Not needed. Screw the UI.. Voice is where this House is going.

@CCOSTAN CCOSTAN closed this as completed Nov 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant