Skip to content

Commit

Permalink
Merge pull request #34 from caiosweet/beta
Browse files Browse the repository at this point in the history
ready for a release
  • Loading branch information
caiosweet authored Jun 20, 2023
2 parents f37eb69 + 58b8b01 commit 7129ae5
Show file tree
Hide file tree
Showing 30 changed files with 1,469 additions and 1,090 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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
39 changes: 19 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,51 +34,50 @@ To get started, head over to the **[Notifier Wiki][Wiki]**.

___

<div align="center">

## Dashboard preview

### [My Lovelace Card Menu](./extra/my_lovelace_card.yaml)
<div align="center">

### [Card My Menu Custom](./lovelace/card_my_menu_custom.yaml)

<p align="center">
<img src="./assets/images/CN_my_card_menu.png">
<img src="./assets/images/CN_card_my_menu_custom.png" width="500">
<br><br>
</p>

> Custom cards used for this menu:
>
> [Banner card](https://github.com/nervetattoo/banner-card),
> [Lovelace card mod](https://github.com/thomasloven/lovelace-card-mod),
> [Lovelace fold entity row](https://github.com/thomasloven/lovelace-fold-entity-row),
> [Lovelace multiline text input card](https://github.com/faeibson/lovelace-multiline-text-input-card),
> [Lovelace paper buttons row](https://github.com/jcwillox/lovelace-paper-buttons-row),
> [Lovelace slider entity row](https://github.com/thomasloven/lovelace-slider-entity-row),
> [Vertical stack in card](https://github.com/ofekashery/vertical-stack-in-card)
### 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),
[Lovelace fold entity row](https://github.com/thomasloven/lovelace-fold-entity-row),

[Lovelace multiline text input card](https://github.com/faeibson/lovelace-multiline-text-input-card),
[Lovelace paper buttons row](https://github.com/jcwillox/lovelace-paper-buttons-row),
[Vertical stack in card](https://github.com/ofekashery/vertical-stack-in-card)

&nbsp;

### [My Lovelace view](./extra/my_lovelace_view.yaml)
### [Standard Card Menu](./lovelace/card_menu.yaml)

<p align="center">
<img src="./assets/images/CN_my_view.png">
<img src="./assets/images/CN_card_menu.png" width="500">
<br><br>
</p>

&nbsp;

### [Standard Cards & Custom vertical Menu](./lovelace/)
### [Standard Card Menu HUI](./lovelace/card_menu_hui.yaml)

<p align="center">
<img src="./assets/images/CN_vertical_stack_in_card_menu.png">
<img src="./assets/images/CN_card_menu_hui.png" width="500">
<br><br>
</p>

&nbsp;

### [Standard Lovelace View and Cards](./lovelace/)
### [Standard Dashboard](./lovelace/dashboard_raw.yaml)

<p align="center">
<img src="./assets/images/CN_standard_cards.png">
<img src="./assets/images/CN_standard_dashboard.png" width="500">
<br><br>
</p>

Expand Down
Binary file added assets/images/CN_card_menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/CN_card_menu_hui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/CN_card_my_menu_custom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/images/CN_my_card_menu.png
Binary file not shown.
Binary file removed assets/images/CN_my_view.png
Binary file not shown.
Binary file removed assets/images/CN_standard_cards.png
Binary file not shown.
Binary file added assets/images/CN_standard_dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/images/CN_vertical_stack_in_card_menu.png
Binary file not shown.
123 changes: 52 additions & 71 deletions blueprints/automation/caiosweet/notifier_startup_configuration.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
blueprint:
name: Notifier startup configuration
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
Expand All @@ -26,7 +30,7 @@ blueprint:
name: Personal Assistant
description: |-
Imposta il nome del tuo assistente personale.
Verrà utilizzato nei titoli dei messaggi testuali e in dashborad.
Verrà utilizzato nei titoli dei messaggi testuali, in plancia, e nelle notifiche di home assistant.
Esempio **[Jarvis - 20:43:12] Garage**
_Choose a name for your personal assistant_
Expand Down Expand Up @@ -151,19 +155,21 @@ blueprint:
enabled_home_assistant_event:
name: Notification Home Assistant Event
description: |-
Abilitazione per la ricezione dei seguentio eventi di home assistant:
Abilitazione per la ricezione dei seguenti eventi di home assistant:
Avvio, Scrittura finale, Chiusura, Stop e Riavvio manuale.
Come opzione, puoi aggiungere nel tuo sistema, il sensore per conoscere i tempi di avvio di home assistant, che trovi nel file [utility](https://github.com/caiosweet/Package-Notification-HUB-AppDaemon/tree/main/extra)
_Notification Home Assistant Start/Final Write/Close/Stop/Restart_
_As an option, you can add in your system the sensor to know the home assistant startup time, which you find in the file [utility]_
default: on
selector:
boolean: {}
default: true

ha_event_notify:
name: Notification Home Assistant Start
description: >-
Puoi scegliere un o più servizi di "notify" diversi, per le notifiche di Home Assistant, invece di quello predefinito.
name: Notify service Notification Home Assistant Event
description: |-
Puoi scegliere uno o più servizi di "notify" diversi, per le notifiche di Home Assistant, invece di quello predefinito.
_You can choose one or more different "notify" services for Home Assistant notifications instead of the default one._
default: the state of the text notification selector
Expand Down Expand Up @@ -252,8 +258,7 @@ blueprint:
sip_server_name:
name: Service Sip server name
description: |-
N. Tel / @user: inserire qui il numero di telefono da chiamare o l’utente telegram.
[Addon](https://github.com/sdesalve/hassio-addons/tree/master/dss_voip) del nostro Admin SDesalve o chiamata tramite [CallMeBot Telegram](https://www.callmebot.com/telegram-call-api/)
Inserire il servizio utilizzato nell'[Addon](https://github.com/sdesalve/hassio-addons/tree/master/dss_voip) del nostro Admin SDesalve
_Service Sip server name_
default: fritz.box:5060
Expand All @@ -275,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
Expand Down Expand Up @@ -309,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
Expand Down Expand Up @@ -478,7 +486,7 @@ action:
entities: >-
{# Backword compatible .endswith('hub') #}
{{states.automation
| select('match','.*[_\s]hub|.*notifier[_\s]', ignorecase=True)
| select('match','.*[_\s]hub|.*notifier[_\s]|centro.notifiche[_\s]', ignorecase=True)
| map(attribute='entity_id') | list }}
- alias: "Creation of the notifier_location_tracker Group from Person"
Expand All @@ -505,25 +513,6 @@ action:
object_id: notifier_player_google
entities: "{{ google_media_player }}"

- alias: "IF DEBUG - GROUP SETTING"
if: "{{ debug }}"
then:
- service: persistent_notification.create
data:
notification_id: "centro_notifiche_config_group"
title: "GROUP Setting"
message: |
```yaml
___
AUTO GROUPS
PERSON: {{ state_attr('group.notifier_location_tracker', 'entity_id') }}
ALEXA: {{ state_attr('group.notifier_player_alexa', 'entity_id') }}
GOOGLE: {{ state_attr('group.notifier_player_google', 'entity_id') }}
___
INTERATION: {{ integration_entities('group') }}
___
```
- alias: "Set the default settings to get started"
if:
- "{{ is_script }}"
Expand Down Expand Up @@ -716,7 +705,7 @@ action:
message: |-
{% set message = data %}
```json
{{ message | to_json(pretty_print=true,sort_keys=False) }}
{{ message | to_json(pretty_print=true,sort_keys=True) }}
```
#------------------------------------------------------------------------------------#
Expand Down Expand Up @@ -846,7 +835,6 @@ action:
{% set DEFAULT_NOTIFY = iif(CN_NOTIFY in ['unavailable', 'unknown'], HA_NOTIFY, CN_NOTIFY)%}
{{ iif(DEFAULT_NOTIFY is string, (DEFAULT_NOTIFY
| regex_replace(find=" *, *", replace=",") | lower).rsplit(","), DEFAULT_NOTIFY) }}
ha_start: "{{ states('sensor.ha_start') }}"
start_message: >-
{{ iif(states('sensor.notifier_config') != "",
states('sensor.notifier_config'), 'Il sistema ') }} è operativo!.
Expand All @@ -861,42 +849,35 @@ action:
title: "{{ icon }} {{ title }}"
message: |
➡ {{ time }}
- choose:
- conditions:
- "{{ 'start' in title }}"
- "{{ is_script }}"
sequence:
- if: "{{ states.sensor.ha_start.state is defined }}"
then:
- service: homeassistant.update_entity
entity_id:
- sensor.ha_start
- sensor.verifica_tempi_setup
- wait_template: "{{ is_state('sensor.notifier_debug_error', 'on') }}"
# - wait_for_trigger:
# - platform: state
# entity_id: sensor.notifier_debug_error
# to:
# - "on"
# - "OK"
timeout: 120
continue_on_timeout: true
- service: script.my_notify
data:
title: "HomeAssistant Start!"
notify: "notify.{{ notify_name }}"
message: |
📬 {{ start_message }} 🕵
🟩 {{ iif(ha_start != 'unknown', ha_start, states('sensor.notifier_debug_error')) }}
alexa:
mode: "{{ repeat.index == 1 }}"
message: "{{ start_message }}"
voice: Giorgio
type: tts
google:
mode: "{{ repeat.index == 1 }}"
message: "{{ start_message }}"
# default:
# - service: "notify.{{ notify_service[0] }}"
# data:
# message: "DEFAULT: {{ icon }} {{ title }} {{ this.entity_id }}"
- if:
- "{{ 'start' in title }}"
- "{{ is_script }}"
then:
- wait_template: "{{ is_state('sensor.notifier_debug_error', 'on') }}"
timeout: 180
continue_on_timeout: true
- if:
- "{{ states.sensor.ha_start.state is defined }}"
then:
- service: homeassistant.update_entity
entity_id:
- sensor.ha_start
# - sensor.verifica_tempi_setup
- wait_template: "{{ states('sensor.ha_start') not in ['Error', 'unknown'] }}"
timeout: "{{ wait.remaining }}"
- service: script.my_notify
data:
title: "HomeAssistant Start!"
notify: "notify.{{ notify_name }}"
message: |
📬 {{ start_message }} 🕵
🟩 {{ iif(states('sensor.ha_start') != 'unknown',
states('sensor.ha_start'), states('sensor.notifier_debug_error')) }}
alexa:
mode: "{{ repeat.index == 1 }}"
message: "{{ start_message }}"
voice: Giorgio
type: tts
google:
mode: "{{ repeat.index == 1 }}"
message: "{{ start_message }}"
Loading

0 comments on commit 7129ae5

Please sign in to comment.