From 58b8b01448a5d04f597d52779a5ec6ea3129e553 Mon Sep 17 00:00:00 2001 From: caiosweet <24454580+caiosweet@users.noreply.github.com> Date: Tue, 20 Jun 2023 22:20:25 +0200 Subject: [PATCH] added release workflow fix custom cards --- .github/workflows/release.yml | 37 ++++++++++++++ README.md | 2 +- .../notifier_startup_configuration.yaml | 11 +++- lovelace/card_menu.yaml | 8 +-- lovelace/card_my_menu_custom.yaml | 50 +++++++++++++++---- packages/centro_notifiche/hub_main.yaml | 4 +- 6 files changed, 94 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..86858b3 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,37 @@ +name: Release Workflow + +on: + release: + types: [published] + +jobs: + zip-files: + runs-on: ubuntu-latest + steps: + - name: πŸ“₯ Checkout the repository + uses: actions/checkout@v3 + + - name: πŸ”’ Get release version + id: get_version + uses: mikefarah/yq@master + with: + cmd: yq '.homeassistant.customize."package.cn".version' packages/centro_notifiche/hub_main.yaml + + - name: πŸ“¦ Create zip file for the packages blueprints lovelace folder + uses: vimtor/action-zip@v1 + with: + files: packages/ blueprints/ lovelace/ + dest: centro_notifiche.zip + recursive: false + + - name: πŸ“€ Upload the zip file as a release asset and πŸ–ŠοΈ Set version number + uses: svenstaro/upload-release-action@v1-release + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: "${{ github.workspace }}/centro_notifiche.zip" + asset_name: centro_notifiche.zip + # default # tag: ${{ github.ref }} + tag: ${{ steps.get_version.outputs.result }} + prerelease: true + make_latest: false + overwrite: true diff --git a/README.md b/README.md index 65fec51..da25770 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ ___

-### Custom cards used for this menu above: +### My custom menu, contains all in one, but use these custom cards: [Hass Browser mod](https://github.com/thomasloven/hass-browser_mod), [Lovelace card mod](https://github.com/thomasloven/lovelace-card-mod), diff --git a/blueprints/automation/caiosweet/notifier_startup_configuration.yaml b/blueprints/automation/caiosweet/notifier_startup_configuration.yaml index 771fed3..b3d3ac5 100755 --- a/blueprints/automation/caiosweet/notifier_startup_configuration.yaml +++ b/blueprints/automation/caiosweet/notifier_startup_configuration.yaml @@ -1,15 +1,19 @@ blueprint: name: Centro Notifiche - Configurazione Avvio description: > + `v5.0.12` + Blueprint per la configurazione del [Package Centro Notifiche](https://api.github.com/repos/caiosweet/Package-Notification-HUB-AppDaemon/releases/latest) per Appdaemon [Notifier Center](https://github.com/jumping2000/notifier) πŸ”” - Authors [Caio](https://github.com/caiosweet), [Gianpi](https://github.com/jumping2000) by [Site hassiohelp](https://hassiohelp.eu/) - Date Started 01/11/2019 - Updated 20/05/2023 + Date Started 01/11/2019 - Updated 18/06/2023 Guida di riferimento per l'utilizzo del Progetto Centro Notifiche, ed altre informazioni le trovi sul [wiki](https://github.com/caiosweet/Package-Notification-HUB-AppDaemon/wiki) domain: automation author: https://github.com/caiosweet + homeassistant: + min_version: 2023.6.0 input: packages_folder: name: Package folder @@ -276,7 +280,8 @@ blueprint: download: name: Download description: |- - Scarica automaticamente le nuove versioni del pacchetto da Github. + Permette di scaricare i file, della versione piΓΉ recente del package, al riavvio dell'app Notifier. + I file saranno salvati nella cartella centro_notifiche nella directory dei packages. _Download the new stable version of the package from Github._ default: off @@ -310,6 +315,8 @@ mode: parallel # mode: queued max: 50 max_exceeded: silent +trace: + stored_traces: 10 trigger_variables: time_pattern_hours: !input time_pattern_hours diff --git a/lovelace/card_menu.yaml b/lovelace/card_menu.yaml index 4529f7d..f66807c 100755 --- a/lovelace/card_menu.yaml +++ b/lovelace/card_menu.yaml @@ -19,8 +19,8 @@ card: {% endif %} - - square: true - type: grid + - type: grid + square: true columns: 8 cards: - type: button @@ -64,8 +64,8 @@ card: show_icon: true show_name: false show_state: false - - square: false - type: grid + - type: grid + square: false columns: 5 cards: - type: button diff --git a/lovelace/card_my_menu_custom.yaml b/lovelace/card_my_menu_custom.yaml index 0019d76..64a36b8 100755 --- a/lovelace/card_my_menu_custom.yaml +++ b/lovelace/card_my_menu_custom.yaml @@ -70,7 +70,8 @@ cards: styles: button: color: > - {{ iif(is_state(config.entity, 'off'), 'var(--error-color)', 'var(--state-active-color)') }} + {{ iif(is_state(config.entity, 'off'), 'var(--error-color)', + 'var(--state-active-color)') }} hold_action: action: more-info tap_action: @@ -101,13 +102,19 @@ cards: entity: sensor.notifier_debug_error name: Restart App tap_action: - action: call-service - confirmation: - text: Sei sicuro di voler riavviare l'App Notifier? - service: script.my_notify - service_data: - ad: - command: restart + action: fire-dom-event + browser_mod: + service: browser_mod.popup + data: + content: | + Sei sicuro di voler riavviare l'App Notifier? + right_button: SI + left_button: 'NO' + right_button_action: + service: script.my_notify + data: + ad: + command: restart - type: divider style: background-color: var(--primary-color) @@ -414,7 +421,7 @@ cards: - type: custom:paper-buttons-row styles: display: grid - grid-template-columns: 1fr 1fr 2fr + grid-template-columns: repeat(4, 1fr) font-size: 0.9em buttons: - entity: input_boolean.notifier_phone_notifications @@ -434,6 +441,31 @@ cards: styles: button: color: var(--primary-text-color) + - entity: input_button.notifier_reset_config + layout: icon|name + name: Reset + styles: + button: + color: var(--error-color) + tap_action: + action: toggle + confirmation: + text: Procedo al reset della configurazione? + - type: button + layout: icon|name + name: Restart + icon: mdi:restart + styles: + button: + color: var(--error-color) + tap_action: + action: call-service + confirmation: + text: Sei sicuro di voler riavviare l'App Notifier? + service: script.my_notify + service_data: + ad: + command: restart - type: divider style: background-color: var(--primary-color) diff --git a/packages/centro_notifiche/hub_main.yaml b/packages/centro_notifiche/hub_main.yaml index 850cafb..6092021 100755 --- a/packages/centro_notifiche/hub_main.yaml +++ b/packages/centro_notifiche/hub_main.yaml @@ -1,7 +1,7 @@ homeassistant: customize: package.cn: - version: "5.0.12" + version: "5.0.13" date: πŸ“… 01/11/2019 - Updated 11/06/2023 info: https://github.com/caiosweet/Package-Notification-HUB-AppDaemon/wiki links: @@ -9,7 +9,7 @@ homeassistant: package: https://github.com/caiosweet/Package-Notification-HUB-AppDaemon web: https://hassiohelp.eu/ extra_attributes: &extra_attributes - package: "Centro Notifiche πŸ”” 5.0.12" + package: "Centro Notifiche πŸ”” 5.0.13" authors: "Caio & Gianpi" #######################################-#######################################