• Stars
    star
    201
  • Rank 193,771 (Top 4 %)
  • Language
    JavaScript
  • License
    Apache License 2.0
  • Created over 5 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A custom Lovelace component for displaying battery levels for battery entities

Lovelace Battery Entity

A custom Lovelace card for displaying battery levels for battery entities for Home Assistant.

Install

Simple install

  1. Download and copy battery-entity.js into your config/www directory.

  2. Add a reference to battery-entity.js inside your ui-lovelace.yaml.

resources:
  - url: /local/battery-entity.js?v=0.1
    type: module

Installation using Git

Clone this repository into your config/www folder using git.

$ git clone https://github.com/cbulock/lovelace-battery-entity.git

Add a reference to the card in your ui-lovelace.yaml.

resources:
  - url: /local/lovelace-battery-entity/battery-entity.js?v=1
    type: module

Updating

  1. Find your battery-entity.js file in config/www or wherever you ended up storing it.

  2. Replace the local file with the latest one attached in the here: battery-entity.js.

  3. Add the new version number to the end of the cards reference url in your ui-lovelace.yaml like below.

resources:
  - url: /local/battery-entity.js?v=0.2
    type: module

You may need to empty the browsers cache if you have problems loading the updated card.

Using the card

Options

Card options

Name Type Default Since Default Description
type string required v0.1 custom:battery-entity
entity string required v0.1 An entity_id that has a percentage as a state.
name string optional v0.1 friendly_name Override the entities friendly name.
warning integer optional v0.1 35 Sets the level at which the battery icon will be shown as yellow.
critical integer optional v0.1 15 Sets the level at which the battery icon will be shown as red.

Example usage

- type: custom:battery-entity
  entity: sensor.front_door_lock_battery

License

This project is under the Apache License 2.0.

More Repositories

1

home-assistant-configs

Config files used for my install of Home Assistant. This is no longer maintained as I started my install over, and have been using the UI for configuration.
73
star
2

Band-CMS

An old CMS geared toward creating websites for bands
PHP
2
star
3

climate-dashboard

JavaScript
2
star
4

Task-Tracker

Tool for tracking chores and house maintenance
PHP
2
star
5

home

Web app managing and providing APIs for network devices and home automation
PHP
2
star
6

Phone-Data

Displays current data about my mobile phone
PHP
1
star
7

cameron

cameron.bulock.com
PHP
1
star
8

dns-config

Home network DNS config
JavaScript
1
star
9

bulock-home-tech-docs

Documentation for my home network
TeX
1
star
10

Simple-Image-Slideshow

PHP
1
star
11

bulock-home-ui

Frontend for local network API
JavaScript
1
star
12

Lists

Wish lists
1
star
13

ahash

Compute Average Hash (perceptual hash) for image likeness comparison
PHP
1
star
14

Init-Builder

Web interface for building modem init strings
PHP
1
star
15

printer_ink_levels

Script to report ink levels to MQTT server
JavaScript
1
star
16

jquery-imagefit-plugin

jQuery plugin which proportionally scales images to fit the available width.
1
star
17

php-wink

PHP library to pull data from a Wink home automation hub
PHP
1
star
18

Minecraft-Server-Web-Frontend

PHP
1
star
19

bulock-home-api

Local Network API
JavaScript
1
star
20

Cameron-s-Thoughts

Codebase for my personal homepage
PHP
1
star
21

esphome-configs

Configs for my ESPHome devices
1
star
22

Washing-Machine-Automation

Script to watch for events on my washing machine, and alert Home Assistant
JavaScript
1
star