diff --git a/config/lovelace/advanced_dashboard/00_home.yaml b/config/lovelace/advanced_dashboard/00_home.yaml index b82ec0f..9fe5a2f 100644 --- a/config/lovelace/advanced_dashboard/00_home.yaml +++ b/config/lovelace/advanced_dashboard/00_home.yaml @@ -24,11 +24,51 @@ cards: - type: entities title: Github icon: mdi:github-circle + style: | + #states > div:last-child { + margin: 0 -16px -16px -16px; + } entities: - entity: sensor.time_picker_card_downloads icon: mdi:clock + name: Time Picker Card · Downloads + - entity: sensor.time_picker_card_stars + icon: mdi:star + name: Time Picker Card · Stars - entity: sensor.folder_card_downloads icon: mdi:folder + name: Folder Card · Downloads + - entity: sensor.folder_card_stars + icon: mdi:star + name: Folder Card · Stars + - type: custom:mini-graph-card + align_state: left + entities: + - color: var(--accent-color) + entity: sensor.github_rate_limit_remaining + name: Github · Rate Limit · Remaining + group: false + points_per_hour: 20 + line_width: 3 + hour24: true + hours_to_show: 3 + show: + fill: fade + icon: false + # name: false + # state: false + legend: false + tap_action: + action: none + + - type: "custom:weather-card" + current: true + details: true + entity: weather.dark_sky + forecast: true + + - type: vertical-stack + cards: - type: entities title: Quarantine icon: mdi:biohazard @@ -43,14 +83,6 @@ cards: - red: 100 - entity: sensor.quarantine_times_left name: Times left - - type: "custom:weather-card" - current: true - details: true - entity: weather.dark_sky - forecast: true - - - type: vertical-stack - cards: - type: "custom:travel-time-card" title: Travel time columns: diff --git a/config/packages/modules/github.yaml b/config/packages/modules/github.yaml index 7f0bf09..88ff3dd 100644 --- a/config/packages/modules/github.yaml +++ b/config/packages/modules/github.yaml @@ -1,15 +1,47 @@ sensor: + - platform: rest + resource: "https://api.github.com/rate_limit" + name: Github rate limit remaining + value_template: '{{ value_json.rate.remaining }}' + unit_of_measurement: 'queries' + scan_interval: 60 + headers: + Authorization: !secret github_access_token + + - platform: rest + resource: "https://api.github.com/repos/GeorgeSG/lovelace-time-picker-card" + name: Time Picker Card stars + value_template: '{{ value_json.stargazers_count }}' + unit_of_measurement: 'stars' + scan_interval: + hours: 1 + headers: + Authorization: !secret github_access_token + - platform: rest resource: "https://api.github.com/repos/GeorgeSG/lovelace-time-picker-card/releases/latest" name: Time Picker Card downloads value_template: '{{ value_json.assets[0].download_count }}' + unit_of_measurement: 'downloads' scan_interval: 60 headers: Authorization: !secret github_access_token + + - platform: rest + resource: "https://api.github.com/repos/GeorgeSG/lovelace-folder-card" + name: Folder Card stars + value_template: '{{ value_json.stargazers_count }}' + unit_of_measurement: 'stars' + scan_interval: + hours: 1 + headers: + Authorization: !secret github_access_token + - platform: rest resource: "https://api.github.com/repos/GeorgeSG/lovelace-folder-card/releases/latest" name: Folder Card downloads value_template: '{{ value_json.assets[0].download_count }}' + unit_of_measurement: 'downloads' scan_interval: 60 headers: Authorization: !secret github_access_token