-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding GitHub checkrun sensors and MQTT save #21
- Loading branch information
Showing
13 changed files
with
185 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2021.7.4 | ||
2021.8.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
##### | ||
# | ||
# | ||
##### | ||
|
||
alias: github actions webhook | ||
id: 'b70b316f-bf5a-4618-95c3-8594cd290b3a' | ||
|
||
mode: queued | ||
|
||
trigger: | ||
platform: webhook | ||
webhook_id: !secret github_actions_webhook | ||
|
||
condition: '{{trigger.json.check_run.check_suite.head_branch == "master"}}' | ||
|
||
action: | ||
- service: mqtt.publish | ||
data: | ||
topic: 'github_checkrun/{{ trigger.json.check_run.name}}' | ||
payload: > | ||
{"status": {%- if trigger.json.check_run.status == 'completed' -%} | ||
"{{trigger.json.check_run.conclusion}}" | ||
{%- else -%} | ||
"{{trigger.json.check_run.status}}" | ||
{%- endif -%}, "id": "{{trigger.json.check_run.id | ||
}}", "started_at": "{{trigger.json.check_run.started_at | ||
}}", "completed_at": "{{trigger.json.check_run.completed_at | ||
}}", "details_url": "{{trigger.json.check_run.details_url}}"} | ||
retain: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
entities/sensors/system/github_checkrun_home_assistant_beta.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
##### | ||
# Populate data from Checkrun - Home Assistant beta release | ||
# By PinkyWafer - https://github.com/pinkywafer/Home-Assistant_Config/ | ||
##### | ||
|
||
platform: mqtt | ||
name: github_checkrun_home_assistant_beta | ||
state_topic: github_checkrun/home_assistant_beta | ||
value_template: "{{ value_json.status }}" | ||
json_attributes_topic: github_checkrun/home_assistant_beta | ||
icon: mdi:github |
11 changes: 11 additions & 0 deletions
11
entities/sensors/system/github_checkrun_home_assistant_current.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
##### | ||
# Populate data from Checkrun - Home Assistant curent release | ||
# By PinkyWafer - https://github.com/pinkywafer/Home-Assistant_Config/ | ||
##### | ||
|
||
platform: mqtt | ||
name: github_checkrun_home_assistant_current | ||
state_topic: github_checkrun/home_assistant_current | ||
value_template: "{{ value_json.status }}" | ||
json_attributes_topic: github_checkrun/home_assistant_current | ||
icon: mdi:github |
11 changes: 11 additions & 0 deletions
11
entities/sensors/system/github_checkrun_home_assistant_dev.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
##### | ||
# Populate data from Checkrun - Home Assistant dev release | ||
# By PinkyWafer - https://github.com/pinkywafer/Home-Assistant_Config/ | ||
##### | ||
|
||
platform: mqtt | ||
name: github_checkrun_home_assistant_dev | ||
state_topic: github_checkrun/home_assistant_dev | ||
value_template: "{{ value_json.status }}" | ||
json_attributes_topic: github_checkrun/home_assistant_dev | ||
icon: mdi:github |
11 changes: 11 additions & 0 deletions
11
entities/sensors/system/github_checkrun_home_assistant_stable.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
##### | ||
# Populate data from Checkrun - Home Assistant Latest release | ||
# By PinkyWafer - https://github.com/pinkywafer/Home-Assistant_Config/ | ||
##### | ||
|
||
platform: mqtt | ||
name: github_checkrun_home_assistant_stable | ||
state_topic: github_checkrun/home_assistant_stable | ||
value_template: "{{ value_json.status }}" | ||
json_attributes_topic: github_checkrun/home_assistant_stable | ||
icon: mdi:github |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
##### | ||
# Populate data from Checkrun - remarklint | ||
# By PinkyWafer - https://github.com/pinkywafer/Home-Assistant_Config/ | ||
##### | ||
|
||
platform: mqtt | ||
name: github_checkrun_remarklint | ||
state_topic: github_checkrun/remarklint | ||
value_template: "{{ value_json.status }}" | ||
json_attributes_topic: github_checkrun/remarklint | ||
icon: mdi:github |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
##### | ||
# Populate data from Checkrun - yamlint | ||
# By PinkyWafer - https://github.com/pinkywafer/Home-Assistant_Config/ | ||
##### | ||
|
||
platform: mqtt | ||
name: github_checkrun_yamllint | ||
state_topic: github_checkrun/yamllint | ||
value_template: "{{ value_json.status }}" | ||
json_attributes_topic: github_checkrun/yamllint | ||
icon: mdi:github |
Oops, something went wrong.