Skip to content

Commit

Permalink
Merge pull request #40 from caiosweet/beta
Browse files Browse the repository at this point in the history
Stable version 5.1.0
  • Loading branch information
caiosweet authored Jun 28, 2023
2 parents f6dcbb4 + cbcce86 commit 837d256
Show file tree
Hide file tree
Showing 13 changed files with 70 additions and 65 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
name: Release Workflow

on:
# release:
# types: [published]

push:
branches:
- main

workflow_dispatch:

jobs:
Expand All @@ -17,11 +14,11 @@ jobs:
- 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: 🔢 Get release version from hub_main file
id: main_version
run: |
VERSION=$(yq -r '.homeassistant.customize."package.cn".version' ./packages/centro_notifiche/hub_main.yaml)
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: 📦 Create zip file for the packages blueprints lovelace folder
run: |
Expand All @@ -34,7 +31,8 @@ jobs:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: "${{ github.workspace }}/centro_notifiche.zip"
asset_name: centro_notifiche.zip
tag: v${{ steps.get_version.outputs.result }}
tag: v${{ steps.main_version.outputs.version }}
release_name: ${{ steps.main_version.outputs.version }}
overwrite: true
prerelease: true
make_latest: false
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@

# Package Notification HUB AppDaemon

> **Warning**
> This is a package for Home Assistant, which works together with the [Notifier][notifier] App in [AppDaemon][appdaemon].
> **Note**
> This project is used to send, in one place, text messages (Telegram, Push...), TTS Google and Alexa, Voip notifications to you and/or your devices such as Pcs, smartphones, pads, etc.
⭐ Star us on GitHub — it motivates us a lot!

Package Notification HUB AppDaemon<br>
Expand All @@ -10,6 +16,8 @@ Package Notification HUB AppDaemon<br>
[![Maintenance](https://img.shields.io/badge/Maintained%3F-Yes-brightgreen.svg)](https://github.com/caiosweet/Package-Notification-HUB-AppDaemon/graphs/commit-activity)
[![GitHub issues](https://img.shields.io/github/issues/caiosweet/Package-Notification-HUB-AppDaemon)](https://github.com/caiosweet/Package-Notification-HUB-AppDaemon/issues)

[![Release Workflow](https://github.com/caiosweet/Package-Notification-HUB-AppDaemon/actions/workflows/release.yml/badge.svg)](https://github.com/caiosweet/Package-Notification-HUB-AppDaemon/actions/workflows/release.yml)

Appdaemon Notifier for Home Assistant by [Engineer Gianpi (@jumping2000)](https://github.com/jumping2000/appdaemon/commits?author=jumping2000)<br>
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/jumping2000/notifier)](https://github.com/jumping2000/notifier/releases)
[![GitHub Release Date](https://img.shields.io/github/release-date/jumping2000/notifier)](https://github.com/jumping2000/notifier/releases)
Expand All @@ -22,13 +30,9 @@ How to reach us:<br>
[![Chat on Facebook](https://img.shields.io/badge/Group-Facebook-blue?logo=Facebook)](https://www.facebook.com/groups/2062381507393179/)
[![Forum](https://img.shields.io/badge/HassioHelp-Forum-blue?logo=Wordpress)](https://forum.hassiohelp.eu/showthread.php?tid=481&pid=1758#pid1758)

*This is a package for Home Assistant, which works together with the [Notifier][notifier] App in [AppDaemon][appdaemon].
It is used to send, in one place, text messages (Telegram, Push...),
TTS Google and Alexa, Voip notifications to you and/or your devices such as Pcs, smartphones, pads, etc.*

## [Getting Started][Wiki]

To get started, head over to the **[Notifier Wiki][Wiki]**.
To get started, go to the **[Wiki page][Wiki]**.

[![Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.](https://my.home-assistant.io/badges/blueprint_import.svg)](https://my.home-assistant.io/redirect/blueprint_import/?blueprint_url=https%3A%2F%2Fgithub.com%2Fcaiosweet%2FPackage-Notification-HUB-AppDaemon%2Fblob%2Fbeta%2Fblueprints%2Fautomation%2Fcaiosweet%2Fnotifier_startup_configuration.yaml)

Expand Down
32 changes: 18 additions & 14 deletions blueprints/automation/caiosweet/notifier_startup_configuration.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
blueprint:
name: Centro Notifiche - Configurazione Avvio
description: >
`v5.0.15`
`v5.1.0`
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) 🔔 -
Expand Down Expand Up @@ -469,17 +469,6 @@ action:
➡ {{ now().time() }}"
- stop: "Wait App"

- variables:
zero_time: >
{% set a = states('input_datetime.notifier_start_early_morning') %}
{% set b = states('input_datetime.notifier_start_morning') %}
{% set c = states('input_datetime.notifier_start_afternoon') %}
{% set d = states('input_datetime.notifier_start_evening') %}
{% set e = states('input_datetime.notifier_start_night') %}
{% set f = states('input_datetime.notifier_start_late_night') %}
{% set lst = [a,b,c,d,e,f] %}
{{ lst[:-1] == lst[1:] and not 'unknown' in lst }}
- alias: "Create groups only on boot and reload"
if:
- "{{ is_script }}"
Expand Down Expand Up @@ -519,10 +508,25 @@ action:
object_id: notifier_player_google
entities: "{{ google_media_player }}"

- variables:
zero_time: >
{% set a = states('input_datetime.notifier_start_early_morning') %}
{% set b = states('input_datetime.notifier_start_morning') %}
{% set c = states('input_datetime.notifier_start_afternoon') %}
{% set d = states('input_datetime.notifier_start_evening') %}
{% set e = states('input_datetime.notifier_start_night') %}
{% set f = states('input_datetime.notifier_start_late_night') %}
{% set g = states('input_datetime.notifier_start_weekdays') %}
{% set h = states('input_datetime.notifier_end_weekdays') %}
{% set i = states('input_datetime.notifier_start_holidays') %}
{% set l = states('input_datetime.notifier_end_holidays') %}
{% set lst = [a,b,c,d,e,f,g,h,i,l] %}
{{ (lst[:-1] == lst[1:]) and not 'unknown' in lst }}
- alias: "Set the default settings to get started"
if:
- "{{ is_script }}"
- "{{ trigger.id == 'reset_config' or zero_time }}"
- "{{ (trigger.id == 'reset_config') or zero_time }}"
then:
- alias: "Set Guest if the people list is empty."
if: "{{ not person }}"
Expand Down Expand Up @@ -617,7 +621,7 @@ action:
- input_boolean.notifier_alexa_smart_volume
- service: button.press
target:
entity_id: button.notifier_ssml_reset
entity_id: button.notifier_alexa_ssml_reset
- if: "{{ not not google_media_player }}"
then:
- service: select.select_first
Expand Down
2 changes: 1 addition & 1 deletion lovelace/card_alexa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ card:
- entity: input_number.notifier_alexa_prosody_rate
- entity: input_number.notifier_alexa_prosody_pitch
- entity: input_number.notifier_alexa_prosody_volume
- entity: button.notifier_ssml_reset
- entity: button.notifier_alexa_ssml_reset
- type: section
label: Info
- entity: sensor.notifier_player_alexa
Expand Down
2 changes: 1 addition & 1 deletion lovelace/card_google.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ card:
label: ''
- entity: input_boolean.notifier_google_switch
- entity: select.notifier_player_google
- entity: input_select.notifier_tts_notify
- entity: input_select.notifier_google_tts_notify
- type: section
label: Info
- entity: sensor.notifier_player_google
Expand Down
4 changes: 2 additions & 2 deletions lovelace/card_menu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -228,15 +228,15 @@ card:
state_not: unavailable
card:
type: button
entity: input_select.notifier_tts_notify
entity: input_select.notifier_google_tts_notify
show_name: false
show_icon: false
show_state: true
tap_action:
action: call-service
service: input_select.select_next
service_data:
entity_id: input_select.notifier_tts_notify
entity_id: input_select.notifier_google_tts_notify
- type: conditional
conditions:
- entity: input_boolean.notifier_alexa_switch
Expand Down
4 changes: 2 additions & 2 deletions lovelace/card_menu_hui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -227,15 +227,15 @@ card:
tap_action:
action: toggle
- type: button
entity: input_select.notifier_tts_notify
entity: input_select.notifier_google_tts_notify
show_icon: false
show_name: false
show_state: true
tap_action:
action: call-service
service: input_select.select_next
service_data:
entity_id: input_select.notifier_tts_notify
entity_id: input_select.notifier_google_tts_notify
- type: button
entity: button.notifier_last_message
icon_height: 24px
Expand Down
8 changes: 4 additions & 4 deletions lovelace/card_my_menu_custom.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ cards:
- entity: input_number.notifier_alexa_prosody_rate
- entity: input_number.notifier_alexa_prosody_pitch
- entity: input_number.notifier_alexa_prosody_volume
- entity: button.notifier_ssml_reset
- entity: button.notifier_alexa_ssml_reset
- type: section
label: Info
- entity: sensor.notifier_player_alexa
Expand Down Expand Up @@ -356,7 +356,7 @@ cards:
entities:
- entity: input_boolean.notifier_google_switch
- entity: select.notifier_player_google
- entity: input_select.notifier_tts_notify
- entity: input_select.notifier_google_tts_notify
- type: section
label: Info
- entity: sensor.notifier_player_google
Expand Down Expand Up @@ -391,7 +391,7 @@ cards:
service: select.select_first
target:
entity_id: select.notifier_player_google
- entity: input_select.notifier_tts_notify
- entity: input_select.notifier_google_tts_notify
layout: icon|state
icon: false
state_text:
Expand All @@ -406,7 +406,7 @@ cards:
action: call-service
service: input_select.select_next
service_data:
entity_id: input_select.notifier_tts_notify
entity_id: input_select.notifier_google_tts_notify
- entity: sensor.notifier_player_google
layout: state
styles:
Expand Down
8 changes: 4 additions & 4 deletions lovelace/dashboard_raw.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -235,15 +235,15 @@ views:
state_not: unavailable
card:
type: button
entity: input_select.notifier_tts_notify
entity: input_select.notifier_google_tts_notify
show_name: false
show_icon: false
show_state: true
tap_action:
action: call-service
service: input_select.select_next
service_data:
entity_id: input_select.notifier_tts_notify
entity_id: input_select.notifier_google_tts_notify
- type: conditional
conditions:
- entity: input_boolean.notifier_alexa_switch
Expand Down Expand Up @@ -412,7 +412,7 @@ views:
- entity: input_number.notifier_alexa_prosody_rate
- entity: input_number.notifier_alexa_prosody_pitch
- entity: input_number.notifier_alexa_prosody_volume
- entity: button.notifier_ssml_reset
- entity: button.notifier_alexa_ssml_reset
- type: section
label: Info
- entity: sensor.notifier_player_alexa
Expand Down Expand Up @@ -450,7 +450,7 @@ views:
label: ''
- entity: input_boolean.notifier_google_switch
- entity: select.notifier_player_google
- entity: input_select.notifier_tts_notify
- entity: input_select.notifier_google_tts_notify
- type: section
label: Info
- entity: sensor.notifier_player_google
Expand Down
11 changes: 5 additions & 6 deletions packages/centro_notifiche/hub_alexa.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
homeassistant:
customize:
package.cn:
icon: https://github.com/vigonotion/hass-simpleicons
extra_attributes: &extra_attributes
package: "Centro Notifiche 🔔"
authors: "Caio & Gianpi"
simpleicons: https://github.com/vigonotion/hass-simpleicons
icon: si:amazonalexa
info: https://github.com/caiosweet/Package-Notification-HUB-AppDaemon/wiki

#######################################-#######################################
## INPUT
Expand Down Expand Up @@ -112,7 +111,7 @@ binary_sensor:
#######################################-#######################################
template:
- button:
- name: "notifier_ssml_reset"
- name: "notifier_alexa_ssml_reset"
press:
- service: input_number.set_value
data:
Expand Down Expand Up @@ -192,4 +191,4 @@ template:
# Use modern configuration (BUG in namespace AppDaemon)
# - binary_sensor:
# - name: "notifier_alexa_speak"
# state: "off"
# state: "off"
14 changes: 8 additions & 6 deletions packages/centro_notifiche/hub_customize.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ homeassistant:
customize:
package.cn:
extra_attributes: &extra_attributes
attribution: "Caio & Gianpi - Centro Notifiche 🔔 hassiohelp.eu"
attribution: "Centro Notifiche 🔔 Caio & Gianpi by hassiohelp.eu"

#######################################-#######################################
## CUSTOMIZE
#######################################-#######################################
Expand Down Expand Up @@ -185,6 +186,7 @@ homeassistant:
script.my_notify:
<<: *extra_attributes
friendly_name: "My Notify"
icon: mdi:script-text-play
## SENSOR
sensor.notifier_debug_error:
<<: *extra_attributes
Expand All @@ -210,10 +212,10 @@ homeassistant:
friendly_name: "Alexa parla"
icon: mdi:speaker-message
## BUTTON
button.notifier_ssml_reset:
button.notifier_alexa_ssml_reset:
<<: *extra_attributes
friendly_name: "Ripristina SSML"
# icon: mdi:restore
icon: mdi:gesture-tap-button
## GROUP
group.notifier_player_alexa:
<<: *extra_attributes
Expand All @@ -224,7 +226,7 @@ homeassistant:
<<: *extra_attributes
friendly_name: "Alexa Off/On"
icon: mdi:dots-circle
# icon: mdi:alpha-a-circle
# icon: si:amazonalexa
input_boolean.notifier_alexa_smart_volume:
<<: *extra_attributes
friendly_name: "Imposta volume smart"
Expand Down Expand Up @@ -289,7 +291,7 @@ homeassistant:
<<: *extra_attributes
friendly_name: "Google Off/On"
icon: mdi:dots-horizontal-circle-outline
input_select.notifier_tts_notify:
input_select.notifier_google_tts_notify:
<<: *extra_attributes
friendly_name: "Servizio TTS"
icon: mdi:form-select
Expand Down Expand Up @@ -324,4 +326,4 @@ homeassistant:
unit_of_measurement: "%"
sensor.notifier_*_volume:
<<: *extra_attributes
unit_of_measurement: "%"
unit_of_measurement: "%"
6 changes: 2 additions & 4 deletions packages/centro_notifiche/hub_google.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
homeassistant:
customize:
package.cn:
extra_attributes: &extra_attributes
package: "Centro Notifiche 🔔"
authors: "Caio & Gianpi"
info: https://github.com/caiosweet/Package-Notification-HUB-AppDaemon/wiki

#######################################-#######################################
## INPUT
#######################################-#######################################
input_boolean:
notifier_google_switch:
input_select:
notifier_tts_notify:
notifier_google_tts_notify:
options: ["Google Say", "Google Cloud", "Google Assistant", "Reverso"]

#######################################-#######################################
Expand Down
Loading

0 comments on commit 837d256

Please sign in to comment.