diff --git a/config/lovelace/advanced_dashboard/00_home.yaml b/config/lovelace/advanced_dashboard/00_home.yaml index 31bd69f..87f465a 100644 --- a/config/lovelace/advanced_dashboard/00_home.yaml +++ b/config/lovelace/advanced_dashboard/00_home.yaml @@ -24,10 +24,6 @@ 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 @@ -41,26 +37,6 @@ cards: - 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 - lower_bound: 0 - show: - fill: fade - icon: false - # name: false - # state: false - legend: false - tap_action: - action: none - type: "custom:weather-card" current: true diff --git a/config/packages/modules/github.yaml b/config/packages/modules/github.yaml index 1c541cb..d2b9b16 100644 --- a/config/packages/modules/github.yaml +++ b/config/packages/modules/github.yaml @@ -1,13 +1,4 @@ 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 @@ -23,7 +14,8 @@ sensor: name: Time Picker Card downloads value_template: '{{ value_json.assets[0].download_count }}' unit_of_measurement: 'downloads' - scan_interval: 60 + scan_interval: + minutes: 10 headers: Authorization: !secret github_access_token @@ -42,7 +34,8 @@ sensor: name: Folder Card downloads value_template: '{{ value_json.assets[0].download_count }}' unit_of_measurement: 'downloads' - scan_interval: 60 + scan_interval: + minutes: 10 headers: Authorization: !secret github_access_token @@ -64,9 +57,9 @@ automation: {% if trigger %} {% set diff = trigger.to_state.state|int - trigger.from_state.state|int %} - Hey, {% if diff > 1 %}{{diff}} people{% else %}1 person{% endif%} just downloaded - {% if trigger.entity_id == 'sensor.folder_card_downloads' %} folder card - {% elif trigger.entity_id == 'sensor.time_picker_card_downloads' %} time picker card + Hey, {% if diff > 1 %}{{diff}} people{% else %}1 person{% endif%} downloaded + {% if trigger.entity_id == 'sensor.folder_card_downloads' %} folder card in the last 10 minutes + {% elif trigger.entity_id == 'sensor.time_picker_card_downloads' %} time picker card in the last 10 minutes {% else %} something, but I don't know what. This should never happen! {% endif %} {% else %}