{"id":13613843,"url":"https://github.com/cbulock/lovelace-battery-entity","last_synced_at":"2025-08-19T15:07:33.879Z","repository":{"id":34360005,"uuid":"177480500","full_name":"cbulock/lovelace-battery-entity","owner":"cbulock","description":"A custom Lovelace component for displaying battery levels for battery entities","archived":false,"fork":false,"pushed_at":"2022-07-06T03:05:23.000Z","size":112,"stargazers_count":217,"open_issues_count":21,"forks_count":24,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-01T19:49:18.292Z","etag":null,"topics":["battery-entities","home-assistant","lovelace"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cbulock.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-24T23:09:51.000Z","updated_at":"2025-02-24T17:43:21.000Z","dependencies_parsed_at":"2022-07-21T04:38:50.945Z","dependency_job_id":null,"html_url":"https://github.com/cbulock/lovelace-battery-entity","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/cbulock/lovelace-battery-entity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbulock%2Flovelace-battery-entity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbulock%2Flovelace-battery-entity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbulock%2Flovelace-battery-entity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbulock%2Flovelace-battery-entity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cbulock","download_url":"https://codeload.github.com/cbulock/lovelace-battery-entity/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbulock%2Flovelace-battery-entity/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271173321,"owners_count":24711667,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-19T02:00:09.176Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["battery-entities","home-assistant","lovelace"],"created_at":"2024-08-01T20:00:54.095Z","updated_at":"2025-08-19T15:07:33.851Z","avatar_url":"https://github.com/cbulock.png","language":"JavaScript","funding_links":[],"categories":["Lovelace User Interface","Install from Source","Dashboards","JavaScript"],"sub_categories":["Custom Lovelace UI Cards","Smart Home Automation","Custom Cards"],"readme":"# Lovelace Battery Entity\n\n\nA custom [Lovelace](https://www.home-assistant.io/dashboards/) card for displaying battery levels for battery entities for [Home Assistant](https://www.home-assistant.io/).\n\n\u003cimg src=\"https://raw.githubusercontent.com/cbulock/lovelace-battery-entity/master/images/screenshot.png\" width=\"300\"\u003e\n\n## Install\n\n### Simple install\n\n1. Download and copy [battery-entity.js](https://raw.githubusercontent.com/cbulock/lovelace-battery-entity/master/battery-entity.js) into your `config/www` directory.\n\n2. Add a reference to `battery-entity.js` inside your `ui-lovelace.yaml`.\n\n  ```yaml\n  resources:\n    - url: /local/battery-entity.js?v=0.1\n      type: module\n  ```\n\n### Installation using Git\n**Clone this repository into your `config/www` folder using git.**\n\n ```console\n$ git clone https://github.com/cbulock/lovelace-battery-entity.git\n```\n\n**Add a reference to the card in your `ui-lovelace.yaml`.**\n\n```yaml\nresources:\n  - url: /local/lovelace-battery-entity/battery-entity.js?v=1\n    type: module\n```\n\n## Updating\n1. Find your `battery-entity.js` file in `config/www` or wherever you ended up storing it.\n\n2. Replace the local file with the latest one attached in the here: [battery-entity.js](https://raw.githubusercontent.com/cbulock/lovelace-battery-entity/master/battery-entity.js).\n\n3. Add the new version number to the end of the cards reference url in your `ui-lovelace.yaml` like below.\n\n  ```yaml\n  resources:\n    - url: /local/battery-entity.js?v=0.2\n      type: module\n  ```\n\n*You may need to empty the browsers cache if you have problems loading the updated card.*\n\n## Using the card\n\n### Options\n\n#### Card options\n| Name | Type | Default | Since | Default | Description |\n|------|------|---------|-------|---------|-------------|\n| type | string | **required** | v0.1 | | `custom:battery-entity`\n| entity | string | **required** | v0.1 | | An entity_id that has a percentage as a state.\n| name | string | optional | v0.1 | *friendly_name* | Override the entities friendly name.\n| warning | integer | optional | v0.1 | 35 | Sets the level at which the battery icon will be shown as yellow.\n| critical | integer | optional | v0.1 | 15 | Sets the level at which the battery icon will be shown as red.\n\n\n\n### Example usage\n\n```yaml\n- type: custom:battery-entity\n  entity: sensor.front_door_lock_battery\n```\n\n## License\nThis project is under the Apache License 2.0.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbulock%2Flovelace-battery-entity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcbulock%2Flovelace-battery-entity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbulock%2Flovelace-battery-entity/lists"}