From a06253446b74e3a79d247328f5c3f2c27fcb9f55 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Wed, 29 Apr 2020 21:37:39 -0400 Subject: [PATCH] Switching to github issue updater via @kylegordon --- config/packages/events.yaml | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/config/packages/events.yaml b/config/packages/events.yaml index 75d57a4..5c907d0 100755 --- a/config/packages/events.yaml +++ b/config/packages/events.yaml @@ -72,7 +72,23 @@ automation: - service: media_player.media_stop entity_id: media_player.ha_speaker - + - id: new_ha_notification + alias: New HA Notification + initial_state: true + trigger: + - platform: state + entity_id: binary_sensor.updater + from: 'off' + to: 'on' + action: + - service: script.twitter_new_ha + # - service: ifttt.trigger + # data_template: {"event":"GitPost", "value1":"Home Assistant {{ states.binary_sensor.updater.attributes.newest_version }} is now available.", "value2":"{{ states.binary_sensor.updater.attributes.newest_version }}"} + - service: rest_command.new_version_github_issue + data_template: + version: "{{ states.binary_sensor.updater.attributes.newest_version }}" + + script: rex_manning_audio: @@ -93,4 +109,12 @@ script: entity_id: media_player.ha_speaker data: media_content_id: http://192.168.7.40/audio/Rex_Manning_-_Say_No_More_Mon_Amour.mp3 - media_content_type: "music" \ No newline at end of file + media_content_type: "music" + +rest_command: + new_version_github_issue: + url: https://api.github.com/repos/thejeffreystone/home-assistant-configuration/issues + method: POST + headers: + Authorization: !secret github_token + payload: '{"title":"Home-Assistant {{ version }} available","body":"Home-Assistant {{ version }} is now available"}' \ No newline at end of file