Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
898cc8d
Making changes...
richard-scott Jun 25, 2023
227d5e9
Apply default_config changes
Jun 25, 2023
03eb66a
Removed fist test
richard-scott Jun 25, 2023
ed6c8c9
Apply default_config changes
Jun 25, 2023
b51b5bc
Apply default_config changes
Jun 25, 2023
6bc1c63
Apply default_config changes
Jun 25, 2023
d5ccfbf
Added sed commands to remove cloud entry
richard-scott Jun 25, 2023
183a1d2
Added bash scripts
richard-scott Jun 27, 2023
f1ebc5a
Added cron schedule to workflow
richard-scott Jun 27, 2023
0246913
Added back in upstream workflows
richard-scott Jun 27, 2023
c570e9a
Added in dependabot auto-merges
richard-scott Jun 27, 2023
76a2fa1
Initial run
richard-scott Jun 27, 2023
0d7402c
Added issue templates/config.
richard-scott Jun 27, 2023
0261ffd
Updated manifest to be alphabetical
richard-scott Jun 27, 2023
a998c2b
Updated workflow trigger
richard-scott Jun 27, 2023
f735007
added issue_tracker to manifest
richard-scott Jun 27, 2023
86cb6c8
removed issue_tracker and HACS linting
richard-scott Jun 27, 2023
0277e64
Disabled linting
richard-scott Jun 27, 2023
17b4c02
Get latest TAG from upstream
richard-scott Jul 5, 2023
69c8369
Get latest TAG from upstream
richard-scott Jul 5, 2023
bd4ab73
Get latest TAG from upstream
richard-scott Jul 5, 2023
6376f6a
Get latest TAG from upstream
richard-scott Jul 5, 2023
bfb65c0
Get latest TAG from upstream
richard-scott Jul 5, 2023
cb851d8
Get latest TAG from upstream
richard-scott Jul 5, 2023
c0bb424
Get latest TAG from upstream
richard-scott Jul 5, 2023
7e95293
Apply default_config changes
richard-scott Jul 5, 2023
fec8b5b
Get latest TAG from upstream
richard-scott Jul 5, 2023
30e4816
Get latest TAG from upstream
richard-scott Jul 5, 2023
de4cb34
Get latest TAG from upstream
richard-scott Jul 5, 2023
6f49080
Get latest TAG from upstream
richard-scott Jul 5, 2023
86d4c90
Added delete script
richard-scott Jul 5, 2023
abc257a
Get latest TAG from upstream.
richard-scott Jul 5, 2023
2cc0516
Get latest TAG from upstream.
richard-scott Jul 5, 2023
8e5f8ee
Get latest TAG from upstream.
richard-scott Jul 5, 2023
8222a66
Get latest TAG from upstream.
richard-scott Jul 5, 2023
1049479
Get latest TAG from upstream.
richard-scott Jul 5, 2023
f1efbc8
Get latest TAG from upstream.
richard-scott Jul 5, 2023
3d0dfa4
Get latest TAG from upstream.
richard-scott Jul 5, 2023
ada2697
Apply automatic changes
richard-scott Jul 7, 2023
7ec9e06
Changed GH Action for release creation.
richard-scott Jul 8, 2023
d8ecf66
Apply automatic changes
richard-scott Jul 14, 2023
138c1f3
Apply automatic changes
richard-scott Jul 22, 2023
3d7e62d
Changed regex for finding last tag upstream.
richard-scott Jul 28, 2023
27a1a63
Changed regex for finding last tag upstream.
richard-scott Jul 28, 2023
bfbbc5b
Changed to jq for updating json
richard-scott Jul 28, 2023
c928fbc
Changed to jq for updating json
richard-scott Jul 28, 2023
33c7020
Changed to jq for updating json
richard-scott Jul 29, 2023
3570049
Changed to jq for updating json
richard-scott Jul 29, 2023
809d876
Changed to jq for updating json
richard-scott Jul 29, 2023
d8fd495
Changed to jq for updating json
richard-scott Jul 29, 2023
d783143
Changed to jq for updating json
richard-scott Jul 29, 2023
1f4f0e6
Updating tags code
richard-scott Jul 29, 2023
66dd509
Updating tags code
richard-scott Jul 29, 2023
d54461f
added debug code
richard-scott Jul 29, 2023
8b3792a
removed debug code
richard-scott Jul 29, 2023
289c6e8
Updated git clone command
richard-scott Jul 29, 2023
54214df
Updated git clone command
richard-scott Jul 29, 2023
7ac4736
Restoring tag code
richard-scott Jul 29, 2023
d97d1c7
Apply automatic changes
richard-scott Jul 29, 2023
ed5e44f
Updated release tag detection code
richard-scott Aug 1, 2023
8810b6a
Updated release tag detection code
richard-scott Aug 1, 2023
93c24e9
Apply automatic changes
richard-scott Aug 3, 2023
ee5094a
Apply automatic changes
richard-scott Aug 5, 2023
86e331a
Apply automatic changes
richard-scott Aug 12, 2023
d5f8a2b
Apply automatic changes
richard-scott Aug 19, 2023
76ae512
Apply automatic changes
richard-scott Aug 25, 2023
7bcdd5e
Apply automatic changes
richard-scott Sep 7, 2023
bab7812
Apply automatic changes
richard-scott Sep 9, 2023
34d3e15
Apply automatic changes
richard-scott Sep 13, 2023
5c1934f
Apply automatic changes
richard-scott Sep 25, 2023
20f2ed0
Apply automatic changes
richard-scott Oct 5, 2023
510bc12
Apply automatic changes
richard-scott Oct 7, 2023
435ddff
Apply automatic changes
richard-scott Oct 13, 2023
46fd1e3
Apply automatic changes
richard-scott Oct 14, 2023
d9e15bb
Apply automatic changes
richard-scott Oct 22, 2023
fb02eea
Apply automatic changes
richard-scott Oct 23, 2023
9177373
Apply automatic changes
richard-scott Nov 2, 2023
e413063
A fix for Issue #1
richard-scott Nov 2, 2023
bcac766
Apply automatic changes
richard-scott Nov 5, 2023
5143d70
Updated script to only rsync new changes.
richard-scott Nov 6, 2023
87eba2a
Apply automatic changes
richard-scott Nov 11, 2023
2e42e9f
Reverted changes
richard-scott Nov 11, 2023
8beb5e4
Apply automatic changes
richard-scott Nov 23, 2023
b64d159
Added checks for upstream changes
richard-scott Nov 23, 2023
02d4ef8
Reverted code changes
richard-scott Dec 5, 2023
1cdb69b
Apply automatic changes
richard-scott Dec 5, 2023
2e57252
Apply automatic changes
richard-scott Dec 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
name: "Bug report"
description: "Report a bug with the integration"
labels: "Bug"
body:
- type: markdown
attributes:
value: Before you open a new issue, search through the existing issues to see if others have had the same problem.
- type: textarea
attributes:
label: "System Health details"
description: "Paste the data from the System Health card in Home Assistant (https://www.home-assistant.io//more-info/system-health#github-issues)"
validations:
required: true
- type: checkboxes
attributes:
label: Checklist
options:
- label: I have enabled debug logging for my installation.
required: true
- label: I have filled out the issue template to the best of my ability.
required: true
- label: This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
required: true
- label:
This issue is not a duplicate issue of currently [previous
issues](https://github.com/ludeeus/integration_blueprint/issues?q=is%3Aissue+label%3A%22Bug%22+)..
required: true
- type: textarea
attributes:
label: "Describe the issue"
description: "A clear and concise description of what the issue is."
validations:
required: true
- type: textarea
attributes:
label: Reproduction steps
description: "Without steps to reproduce, it will be hard to fix, it is very important that you fill out this part, issues without it will be closed"
value: |
1.
2.
3.
...
validations:
required: true
- type: textarea
attributes:
label: "Debug logs"
description:
"To enable debug logs check this https://www.home-assistant.io/integrations/logger/, this **needs** to include _everything_ from startup of Home
Assistant to the point where you encounter the issue."
render: text
validations:
required: true

- type: textarea
attributes:
label: "Diagnostics dump"
description: "Drag the diagnostics dump file here. (see https://www.home-assistant.io/integrations/diagnostics/ for info)"
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
49 changes: 49 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
name: "Feature request"
description: "Suggest an idea for this project"
labels: "Feature+Request"
body:
- type: markdown
attributes:
value: Before you open a new feature request, search through the existing feature requests to see if others have had the same idea.
- type: checkboxes
attributes:
label: Checklist
options:
- label: I have filled out the template to the best of my ability.
required: true
- label: This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request).
required: true
- label:
This issue is not a duplicate feature request of [previous feature
requests](https://github.com/ludeeus/integration_blueprint/issues?q=is%3Aissue+label%3A%22Feature+Request%22+).
required: true

- type: textarea
attributes:
label: "Is your feature request related to a problem? Please describe."
description: "A clear and concise description of what the problem is."
placeholder: "I'm always frustrated when [...]"
validations:
required: true

- type: textarea
attributes:
label: "Describe the solution you'd like"
description: "A clear and concise description of what you want to happen."
validations:
required: true

- type: textarea
attributes:
label: "Describe alternatives you've considered"
description: "A clear and concise description of any alternative solutions or features you've considered."
validations:
required: true

- type: textarea
attributes:
label: "Additional context"
description: "Add any other context or screenshots about the feature request here."
validations:
required: true
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: "github-actions"
target-branch: "staging"
directory: "/"
schedule:
interval: "monthly"
17 changes: 0 additions & 17 deletions .github/workflows/HACS.yml

This file was deleted.

61 changes: 61 additions & 0 deletions .github/workflows/default_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Update default_config

on:
workflow_dispatch:
branches:
- main
push:
branches:
- main
schedule:
- cron: "0 0 * * *"

concurrency:
group: "${{ github.workflow }}@${{ github.ref_name }}"
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest

permissions: write-all

steps:
- name: "Checkout ${{ github.head_ref }}"
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
path: "clone"

- name: "Checkout Git https://github.com/home-assistant/core/"
uses: actions/checkout@v3
with:
repository: "home-assistant/core"
path: "upstream"

- name: Update files via script
shell: bash
run: "clone/bin/update.sh"

# - name: HACS Action
# uses: "hacs/action@main"
# with:
# category: "integration"

# - name: Home Assistant 'hassfest' Action
# uses: "home-assistant/actions/hassfest@master"

- uses: stefanzweifel/git-auto-commit-action@v4
id: auto-commit-action
with:
repository: clone

- name: Create Release
if: steps.auto-commit-action.outputs.changes_detected == 'true'
uses: ncipollo/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
skipIfReleaseExists: true
tag: "${{ env.latest_tag }}"
name: "Release ${{ env.latest_tag }}"
21 changes: 21 additions & 0 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Automerge Dependabot

on:
pull_request:
pull_request_target:
branches:
- "staging"

permissions:
id-token: write
contents: write
pull-requests: write

jobs:
automerge-dependabot:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- uses: fastify/github-action-merge-dependabot@v3
with:
target: minor
14 changes: 0 additions & 14 deletions .github/workflows/hassfest.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.history
cloud.code-workspace
upstream
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "core"]
path = core
url = https://github.com/home-assistant/core
4 changes: 4 additions & 0 deletions bin/delete-workflow-run-history
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
cd "$(dirname "$(dirname "${0}")")" || exit 1
set -e -o pipefail
gh run list --limit 9999 --json databaseId -q '.[].databaseId' | xargs -IID gh api "repos/$(gh repo view --json nameWithOwner -q .nameWithOwner)/actions/runs/ID" -X DELETE --silent 2>/dev/null
53 changes: 53 additions & 0 deletions bin/update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!/bin/bash -x

# Move to a known location and save as START_DIR.
cd "$(dirname "$(dirname "${0}")")" || exit 1
START_DIR="${PWD}"

# Ensure we exit if anything usingn a pipe ('|') fails.
set -e -o pipefail

# Get the latest tag from the GitHub API.
HOME_ASSISTANT_CORE_LATEST_TAG="$(curl -Ls https://api.github.com/repos/home-assistant/core/tags | jq '.[].name' | sed 's/"//g' | grep -Ev '[[:alpha:]]' | sort -V | tail -n 1)"
if [[ -n "${GITHUB_ENV}" ]]; then
echo "latest_tag=${HOME_ASSISTANT_CORE_LATEST_TAG}" >>"$GITHUB_ENV"
fi

# If we haven't already checked out the repo, do so now.
if [[ ! -d upstream ]]; then

# Clone the repo max-depth of 1 commit as we only need the latest.
git clone --depth 1 https://github.com/home-assistant/core/ upstream

# Ensure that the core directory gets cleaned up on exit.
trap "rm -rf "${START_DIR}/upstream"" EXIT

fi

# Create a variable for the source directory we are using.
SRC_DIR="${START_DIR}/upstream/homeassistant/components/default_config"

# Check the source directory exists
test -d "${SRC_DIR}" || exit 1

# Create somewhere for our updated code to go.
if [[ ! -d custom_components/default_config ]]; then
mkdir -p custom_components/default_config
fi

# Check for changed files
if [[ $(rsync -avz --checksum --dry-run ${START_DIR}/upstream/homeassistant/components/default_config ${START_DIR}/custom_components | grep -c default_config) -gt 1 ]]; then

# Copy over the upstream files
rsync -avz "${START_DIR}/upstream/homeassistant/components/default_config" "${START_DIR}/custom_components"

# Add in required data for the component to get loaded
cat <<<$(jq ". + { "version": \"${HOME_ASSISTANT_CORE_LATEST_TAG}.1\" }" ${START_DIR}/custom_components/default_config/manifest.json) >${START_DIR}/custom_components/default_config/manifest.json

# Disable the 'cloud' integration.
cat <<<$(jq 'del(.dependencies[] | select(. == "cloud"))' ${START_DIR}/custom_components/default_config/manifest.json) >${START_DIR}/custom_components/default_config/manifest.json

# Update hacs.json with the minimum homeassistant value for the latest release
cat <<<$(jq ".homeassistant = \"${HOME_ASSISTANT_CORE_LATEST_TAG}\"" ${START_DIR}/hacs.json) >${START_DIR}/hacs.json

fi
7 changes: 0 additions & 7 deletions custom_components/cloud/__init__.py

This file was deleted.

12 changes: 0 additions & 12 deletions custom_components/cloud/manifest.json

This file was deleted.

18 changes: 18 additions & 0 deletions custom_components/default_config/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
"""Component providing default configuration for new users."""
from homeassistant.components.hassio import is_hassio
from homeassistant.core import HomeAssistant
from homeassistant.helpers import config_validation as cv
from homeassistant.helpers.typing import ConfigType
from homeassistant.setup import async_setup_component

DOMAIN = "default_config"

CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN)


async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
"""Initialize default configuration."""
if not is_hassio(hass):
await async_setup_component(hass, "backup", config)

return True
52 changes: 52 additions & 0 deletions custom_components/default_config/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"domain": "default_config",
"name": "Default Config",
"codeowners": [
"@home-assistant/core"
],
"dependencies": [
"application_credentials",
"assist_pipeline",
"automation",
"bluetooth",
"conversation",
"counter",
"dhcp",
"energy",
"frontend",
"hardware",
"history",
"homeassistant_alerts",
"input_boolean",
"input_button",
"input_datetime",
"input_number",
"input_select",
"input_text",
"logbook",
"logger",
"map",
"media_source",
"mobile_app",
"my",
"network",
"person",
"scene",
"schedule",
"script",
"ssdp",
"stream",
"sun",
"system_health",
"tag",
"timer",
"usb",
"webhook",
"zeroconf",
"zone"
],
"documentation": "https://www.home-assistant.io/integrations/default_config",
"integration_type": "system",
"quality_scale": "internal",
"version": "2023.12.0.1"
}
Loading