11# github-entity-row
2+
23Show GitHub repository sensor data on entity rows in Home Assistant's Lovelace UI
34
45[ ![ GH-release] ( https://img.shields.io/github/v/release/benct/lovelace-github-entity-row.svg?style=flat-square )] ( https://github.com/benct/lovelace-github-entity-row/releases )
@@ -7,12 +8,14 @@ Show GitHub repository sensor data on entity rows in Home Assistant's Lovelace U
78[ ![ GH-code-size] ( https://img.shields.io/github/languages/code-size/benct/lovelace-github-entity-row.svg?color=red&style=flat-square )] ( https://github.com/benct/lovelace-github-entity-row )
89[ ![ hacs_badge] ( https://img.shields.io/badge/HACS-Default-orange.svg?style=flat-square )] ( https://github.com/hacs )
910
10- ** NOTE:** This is not a standalone lovelace card, but a row element for the [ entities] ( https://www.home-assistant.io/lovelace/entities/ ) card.
11+ ** NOTE:** This is not a standalone lovelace card, but a row element for
12+ the [ entities] ( https://www.home-assistant.io/lovelace/entities/ ) card.
1113
1214## Installation
1315
1416Add [ github-entity-row.js] ( https://raw.githubusercontent.com/benct/lovelace-github-entity-row/master/github-entity-row.js )
1517to your ` <config>/www/ ` folder and add the following to the ` configuration.yaml ` file:
18+
1619``` yaml
1720lovelace :
1821 resources :
@@ -21,24 +24,39 @@ lovelace:
2124` ` `
2225
2326_OR_ install using [HACS](https://hacs.xyz/) and add this (if in YAML mode):
27+
2428` ` ` yaml
2529lovelace :
2630 resources :
2731 - url : /hacsfiles/lovelace-github-entity-row/github-entity-row.js
2832 type : module
2933` ` `
3034
31- The above configuration can be managed directly in the Configuration -> Lovelace Dashboards -> Resources panel when not using YAML mode,
32- or added by clicking the "Add to lovelace" button on the HACS dashboard after installing the plugin.
35+ The above configuration can be managed in the Configuration -> Dashboards -> Resources panel when not using YAML mode.
3336
3437## Configuration
3538
36- | Name | Type | Default | Description
37- | ---- | ---- | ------- | -----------
38- | type | string | **Required** | ` custom:github-entity-row`
39- | entity | string | **Required** | `sensor.my_github_repository`
40- | name | string | `friendly_name` | Override entity friendly name
41- | icon | string | `mdi:github-circle` | Override default entity icon
39+ | Name | Type | Default | Description |
40+ |--------|--------|-----------------|-------------------------------------------|
41+ | type | string | **Required** | ` custom:github-entity-row` |
42+ | user | string | **Required** | Your GitHub user name |
43+ | repo | string | **Required** | Your GitHub repository |
44+ | sensor | string | `<user>_<repo>` | Specify a custom sensor entity (optional) |
45+ | name | string | `repo` | Override repository name |
46+ | icon | string | `mdi:github` | Override default entity icon |
47+
48+ The `user` and `repo` fields need to exactly match your GitHub user and repository names. If you rename the sensor
49+ entity IDs from the GitHub integration, you can specify the updated sensor ID with the `sensor` field (without the
50+ domain and type suffix). For example, if the integration exposes `sensor.custom_sensor_id_latest_release`, you should
51+ specify `custom_sensor_id`.
52+
53+ # # Migrate to version 2
54+
55+ The GitHub [integration](https://www.home-assistant.io/integrations/github/) was changed in HA version `2022.2.0` to
56+ include several sensors for each GitHub repository. If you are using the latest HA installation, you need to upgrade to
57+ version `>2.0.0` of this card. The main change is that the `entity` field has been replaced by `user` and `repo`. You
58+ might also need to manually enable the following sensors from your GitHub integration; `Stars`, `Issues`
59+ and `Pull Requests`.
4260
4361# # Example
4462
@@ -49,24 +67,19 @@ type: entities
4967title: GitHub
5068entities:
5169 - type: custom:github-entity-row
52- entity: sensor.home_assistant_config
70+ user: benct
71+ repo: home-assistant-config
72+ name: HA Config
5373 - type: custom:github-entity-row
54- entity: sensor.lovelace_github_entity_row
74+ user: benct
75+ repo: lovelace-github-entity-row
76+ icon: mdi:github
5577 - type: custom:github-entity-row
56- entity: sensor.lovelace_xiaomi_vacuum_card
57- ` ` `
58-
59- Usage with [auto-entities](https://github.com/thomasloven/lovelace-auto-entities) card :
60- ` ` ` yaml
61- type: custom:auto-entities
62- card:
63- type: entities
64- filter:
65- include:
66- - entity_id: sensor.github* # or use other matchers
67- options:
68- type: custom:github-entity-row
69- <github-entity-row options>
78+ user: benct
79+ repo: lovelace-multiple-entity-row
80+ - type: custom:github-entity-row
81+ user: benct
82+ repo: lovelace-xiaomi-vacuum-card
7083` ` `
7184
7285# # My cards
0 commit comments