Coder Social home page Coder Social logo

liri / lovelace-battery-entity Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cbulock/lovelace-battery-entity

0.0 1.0 0.0 106 KB

A custom Lovelace component for displaying battery levels for battery entities

License: Apache License 2.0

JavaScript 100.00%

lovelace-battery-entity's Introduction

Lovelace Battery Entity

A custom Lovelace component 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.

lovelace-battery-entity's People

Contributors

cbulock avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.