From 898cc8da63bbf0f05ec66e2c97f9c4dcd8e8f792 Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Sun, 25 Jun 2023 15:25:43 +0100 Subject: [PATCH 01/87] Making changes... --- .github/workflows/HACS.yml | 17 ------------ .github/workflows/default_config.yaml | 40 +++++++++++++++++++++++++++ .github/workflows/hassfest.yml | 14 ---------- .gitignore | 2 ++ custom_components/cloud/__init__.py | 7 ----- custom_components/cloud/manifest.json | 12 -------- 6 files changed, 42 insertions(+), 50 deletions(-) delete mode 100644 .github/workflows/HACS.yml create mode 100644 .github/workflows/default_config.yaml delete mode 100644 .github/workflows/hassfest.yml create mode 100644 .gitignore delete mode 100755 custom_components/cloud/__init__.py delete mode 100755 custom_components/cloud/manifest.json diff --git a/.github/workflows/HACS.yml b/.github/workflows/HACS.yml deleted file mode 100644 index 8a27df1..0000000 --- a/.github/workflows/HACS.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: HACS Action - -on: - push: - pull_request: - # schedule: - # - cron: "0 0 * * mon" - -jobs: - hacs: - name: HACS Action - runs-on: "ubuntu-latest" - steps: - - name: HACS Action - uses: "hacs/action@main" - with: - category: "integration" diff --git a/.github/workflows/default_config.yaml b/.github/workflows/default_config.yaml new file mode 100644 index 0000000..1f543fd --- /dev/null +++ b/.github/workflows/default_config.yaml @@ -0,0 +1,40 @@ +name: Update default_config + +on: + workflow_dispatch: + branches: + - main + +concurrency: + group: "${{ github.workflow }}@${{ github.ref_name }}" + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + + permissions: write-all + + steps: + - name: "Checkout Repo" + uses: actions/checkout@v3 + with: + path: "clone" + + - name: "Checkout Git https://github.com/home-assistant/core/" + uses: actions/checkout@v3 + with: + repository: "home-assistant/core" + path: "core" + + - name: Copy files from core repository + run: | + cp -Rvpf core/homeassistant/components/default_config clone/ + rm -rf core + + - name: Save changes + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: Apply default_config changes + repository: clone + push_options: "--force" diff --git a/.github/workflows/hassfest.yml b/.github/workflows/hassfest.yml deleted file mode 100644 index 420390c..0000000 --- a/.github/workflows/hassfest.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Validate with hassfest - -on: - push: - pull_request: - # schedule: - # - cron: '0 0 * * mon' - -jobs: - validate: - runs-on: "ubuntu-latest" - steps: - - uses: "actions/checkout@v2" - - uses: "home-assistant/actions/hassfest@master" diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e6d8631 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.history +cloud.code-workspace \ No newline at end of file diff --git a/custom_components/cloud/__init__.py b/custom_components/cloud/__init__.py deleted file mode 100755 index 04791b2..0000000 --- a/custom_components/cloud/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -"""Cloud.""" -DOMAIN = "cloud" - -def setup(hass, config): - - # Return boolean to indicate that initialization was successful. - return True \ No newline at end of file diff --git a/custom_components/cloud/manifest.json b/custom_components/cloud/manifest.json deleted file mode 100755 index 10ba1a3..0000000 --- a/custom_components/cloud/manifest.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "domain": "cloud", - "name": "Cloud Hider", - "documentation": "https://github.com/benquan/cloud", - "issue_tracker": "https://github.com/benquan/cloud/issues", - "codeowners": ["@benquan"], - "dependencies": [], - "requirements": [], - "integration_type": "system", - "iot_class": "assumed_state", - "version": "1.0" - } From 227d5e96df86fc81dc470deda460da39c1380163 Mon Sep 17 00:00:00 2001 From: nektos/act Date: Sun, 25 Jun 2023 14:28:37 +0000 Subject: [PATCH 02/87] Apply default_config changes --- default_config/__init__.py | 18 +++++++++++++ default_config/manifest.json | 50 ++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 default_config/__init__.py create mode 100644 default_config/manifest.json diff --git a/default_config/__init__.py b/default_config/__init__.py new file mode 100644 index 0000000..25a9ca3 --- /dev/null +++ b/default_config/__init__.py @@ -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 diff --git a/default_config/manifest.json b/default_config/manifest.json new file mode 100644 index 0000000..684013a --- /dev/null +++ b/default_config/manifest.json @@ -0,0 +1,50 @@ +{ + "domain": "default_config", + "name": "Default Config", + "codeowners": ["@home-assistant/core"], + "dependencies": [ + "application_credentials", + "assist_pipeline", + "automation", + "bluetooth", + "cloud", + "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" +} From 03eb66adfbbe569b4de0757b33154975a5f54f73 Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Sun, 25 Jun 2023 15:30:05 +0100 Subject: [PATCH 03/87] Removed fist test --- .github/workflows/default_config.yaml | 8 ++--- default_config/__init__.py | 18 ---------- default_config/manifest.json | 50 --------------------------- 3 files changed, 3 insertions(+), 73 deletions(-) delete mode 100644 default_config/__init__.py delete mode 100644 default_config/manifest.json diff --git a/.github/workflows/default_config.yaml b/.github/workflows/default_config.yaml index 1f543fd..a38389b 100644 --- a/.github/workflows/default_config.yaml +++ b/.github/workflows/default_config.yaml @@ -16,9 +16,10 @@ jobs: permissions: write-all steps: - - name: "Checkout Repo" + - 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/" @@ -28,13 +29,10 @@ jobs: path: "core" - name: Copy files from core repository - run: | - cp -Rvpf core/homeassistant/components/default_config clone/ - rm -rf core + run: rm -rf custom_components mkdir -p custom_components cp -Rvpf core/homeassistant/components/default_config custom_components/ rm -rf core - name: Save changes uses: stefanzweifel/git-auto-commit-action@v4 with: commit_message: Apply default_config changes repository: clone - push_options: "--force" diff --git a/default_config/__init__.py b/default_config/__init__.py deleted file mode 100644 index 25a9ca3..0000000 --- a/default_config/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -"""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 diff --git a/default_config/manifest.json b/default_config/manifest.json deleted file mode 100644 index 684013a..0000000 --- a/default_config/manifest.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "domain": "default_config", - "name": "Default Config", - "codeowners": ["@home-assistant/core"], - "dependencies": [ - "application_credentials", - "assist_pipeline", - "automation", - "bluetooth", - "cloud", - "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" -} From ed6c8c9f261f5d3f8612a10a14c552568677fcff Mon Sep 17 00:00:00 2001 From: nektos/act Date: Sun, 25 Jun 2023 14:35:48 +0000 Subject: [PATCH 04/87] Apply default_config changes --- custom_components/default_config/__init__.py | 18 +++++++ .../default_config/manifest.json | 50 +++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 custom_components/default_config/__init__.py create mode 100644 custom_components/default_config/manifest.json diff --git a/custom_components/default_config/__init__.py b/custom_components/default_config/__init__.py new file mode 100644 index 0000000..25a9ca3 --- /dev/null +++ b/custom_components/default_config/__init__.py @@ -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 diff --git a/custom_components/default_config/manifest.json b/custom_components/default_config/manifest.json new file mode 100644 index 0000000..684013a --- /dev/null +++ b/custom_components/default_config/manifest.json @@ -0,0 +1,50 @@ +{ + "domain": "default_config", + "name": "Default Config", + "codeowners": ["@home-assistant/core"], + "dependencies": [ + "application_credentials", + "assist_pipeline", + "automation", + "bluetooth", + "cloud", + "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" +} From b51b5bc040199d81aa76d04ac5d0a60c904079c4 Mon Sep 17 00:00:00 2001 From: nektos/act Date: Sun, 25 Jun 2023 14:44:23 +0000 Subject: [PATCH 05/87] Apply default_config changes --- custom_components/default_config/manifest.json | 1 + 1 file changed, 1 insertion(+) diff --git a/custom_components/default_config/manifest.json b/custom_components/default_config/manifest.json index 684013a..1c5d190 100644 --- a/custom_components/default_config/manifest.json +++ b/custom_components/default_config/manifest.json @@ -1,4 +1,5 @@ { + "version": "1.0.0.0", "domain": "default_config", "name": "Default Config", "codeowners": ["@home-assistant/core"], From 6bc1c633fbc67eb99bebcfc5bb56cec6be190a37 Mon Sep 17 00:00:00 2001 From: nektos/act Date: Sun, 25 Jun 2023 14:47:32 +0000 Subject: [PATCH 06/87] Apply default_config changes --- custom_components/default_config/manifest.json | 1 - 1 file changed, 1 deletion(-) diff --git a/custom_components/default_config/manifest.json b/custom_components/default_config/manifest.json index 1c5d190..6d2ef0f 100644 --- a/custom_components/default_config/manifest.json +++ b/custom_components/default_config/manifest.json @@ -8,7 +8,6 @@ "assist_pipeline", "automation", "bluetooth", - "cloud", "conversation", "counter", "dhcp", From d5ccfbf44d7fd8d1e9b86f2710c173d34201ebcb Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Sun, 25 Jun 2023 15:47:33 +0100 Subject: [PATCH 07/87] Added sed commands to remove cloud entry --- .github/workflows/default_config.yaml | 9 ++++++++- custom_components/default_config/manifest.json | 4 +++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/default_config.yaml b/.github/workflows/default_config.yaml index a38389b..c24f9e9 100644 --- a/.github/workflows/default_config.yaml +++ b/.github/workflows/default_config.yaml @@ -29,7 +29,14 @@ jobs: path: "core" - name: Copy files from core repository - run: rm -rf custom_components mkdir -p custom_components cp -Rvpf core/homeassistant/components/default_config custom_components/ rm -rf core + shell: bash + run: | + rm -rf clone/custom_components + mkdir -p clone/custom_components + cp -Rvpf core/homeassistant/components/default_config clone/custom_components/ + sed -i '2i \ "version": "1.0.0.0",' clone/custom_components/default_config/manifest.json + sed -i '/cloud/d' clone/custom_components/default_config/manifest.json + rm -rf core - name: Save changes uses: stefanzweifel/git-auto-commit-action@v4 diff --git a/custom_components/default_config/manifest.json b/custom_components/default_config/manifest.json index 6d2ef0f..c16e079 100644 --- a/custom_components/default_config/manifest.json +++ b/custom_components/default_config/manifest.json @@ -2,7 +2,9 @@ "version": "1.0.0.0", "domain": "default_config", "name": "Default Config", - "codeowners": ["@home-assistant/core"], + "codeowners": [ + "@home-assistant/core" + ], "dependencies": [ "application_credentials", "assist_pipeline", From 183a1d296dc4cc8530dec1b032045aa23d470ed0 Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Tue, 27 Jun 2023 10:11:10 +0100 Subject: [PATCH 08/87] Added bash scripts --- .gitignore | 3 +- bin/update.sh | 55 +++++++++++++++++++ custom_components/default_config/__init__.py | 18 ------ .../default_config/manifest.json | 52 ------------------ hacs.json | 5 +- 5 files changed, 60 insertions(+), 73 deletions(-) create mode 100755 bin/update.sh delete mode 100644 custom_components/default_config/__init__.py delete mode 100644 custom_components/default_config/manifest.json diff --git a/.gitignore b/.gitignore index e6d8631..7a6d072 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .history -cloud.code-workspace \ No newline at end of file +cloud.code-workspace +core diff --git a/bin/update.sh b/bin/update.sh new file mode 100755 index 0000000..3bba8de --- /dev/null +++ b/bin/update.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +# 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 we haven't already checked out the repo, do so now. +if [[ ! -d core ]]; then + + # Clone the repo max-depth of 1 commit as we only need the latest. + git clone --depth 1 --recursive https://github.com/home-assistant/core/ + + # Ensure that the core directory gets cleaned up on exit. + trap 'rm -rf ${START_DIR}/core' EXIT + +fi + +# Create a variable for the source directory we are using. +SRC_DIR="${START_DIR}/core/homeassistant/components/default_config" + +# Check the source directory exists +test -d "${SRC_DIR}" || exit 1 + +# If we have a 'clone' directory then we are running via GitHub Actions +# so change to that directory to have a consistent path structure for the following code. +if [ -d clone ]; then + cd clone +fi + +# Clean out the old data if it exists. +if [[ -d custom_components ]]; then + rm -rf custom_components +fi + +# Create somewhere for our updated code to go. +mkdir -p custom_components/default_config +cd custom_components/default_config + +# Copy over the upstream files +cp -Rpf "${START_DIR}/core/homeassistant/components/default_config" "${START_DIR}/custom_components" + +# Add in required data for the component to get loaded +sed -i "2i \ \"version\": \"${HOME_ASSISTANT_CORE_LATEST_TAG}.1\"," "${START_DIR}/custom_components/default_config/manifest.json" + +# Disable the 'cloud' integration. +sed -i '/cloud/d' "${START_DIR}/custom_components/default_config/manifest.json" + +# Update hacs.json with the minimum homeassistant value for the latest release +sed -i "s/$(cat "${START_DIR}/hacs.json" | grep homeassistant | awk '{print $2}')/\"${HOME_ASSISTANT_CORE_LATEST_TAG}\"/" "${START_DIR}/hacs.json" diff --git a/custom_components/default_config/__init__.py b/custom_components/default_config/__init__.py deleted file mode 100644 index 25a9ca3..0000000 --- a/custom_components/default_config/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -"""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 diff --git a/custom_components/default_config/manifest.json b/custom_components/default_config/manifest.json deleted file mode 100644 index c16e079..0000000 --- a/custom_components/default_config/manifest.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "version": "1.0.0.0", - "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" -} diff --git a/hacs.json b/hacs.json index a74a7d3..3bc8a93 100644 --- a/hacs.json +++ b/hacs.json @@ -1,4 +1,5 @@ { "name": "Home Assistant Cloud Hider", - "render_readme": true -} \ No newline at end of file + "render_readme": true, + "homeassistant": "2023.6.3" +} From f1ebc5a843b9395c7dd9900e3bea3f80b1feb654 Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Tue, 27 Jun 2023 10:13:52 +0100 Subject: [PATCH 09/87] Added cron schedule to workflow --- .github/workflows/default_config.yaml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/default_config.yaml b/.github/workflows/default_config.yaml index c24f9e9..e4d165c 100644 --- a/.github/workflows/default_config.yaml +++ b/.github/workflows/default_config.yaml @@ -4,6 +4,8 @@ on: workflow_dispatch: branches: - main + schedule: + - cron: "0 0 * * *" concurrency: group: "${{ github.workflow }}@${{ github.ref_name }}" @@ -28,15 +30,9 @@ jobs: repository: "home-assistant/core" path: "core" - - name: Copy files from core repository + - name: Update files via script shell: bash - run: | - rm -rf clone/custom_components - mkdir -p clone/custom_components - cp -Rvpf core/homeassistant/components/default_config clone/custom_components/ - sed -i '2i \ "version": "1.0.0.0",' clone/custom_components/default_config/manifest.json - sed -i '/cloud/d' clone/custom_components/default_config/manifest.json - rm -rf core + run: "clone/bin/update.sh" - name: Save changes uses: stefanzweifel/git-auto-commit-action@v4 From 02469137e140b457a2191e595ec031ab22e5594b Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Tue, 27 Jun 2023 10:18:06 +0100 Subject: [PATCH 10/87] Added back in upstream workflows --- .github/workflows/HACS.yaml | 17 +++++++++++++++++ .github/workflows/hassfest.yml | 14 ++++++++++++++ bin/update.sh | 6 +++--- 3 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/HACS.yaml create mode 100644 .github/workflows/hassfest.yml diff --git a/.github/workflows/HACS.yaml b/.github/workflows/HACS.yaml new file mode 100644 index 0000000..8a27df1 --- /dev/null +++ b/.github/workflows/HACS.yaml @@ -0,0 +1,17 @@ +name: HACS Action + +on: + push: + pull_request: + # schedule: + # - cron: "0 0 * * mon" + +jobs: + hacs: + name: HACS Action + runs-on: "ubuntu-latest" + steps: + - name: HACS Action + uses: "hacs/action@main" + with: + category: "integration" diff --git a/.github/workflows/hassfest.yml b/.github/workflows/hassfest.yml new file mode 100644 index 0000000..914fb98 --- /dev/null +++ b/.github/workflows/hassfest.yml @@ -0,0 +1,14 @@ +name: Validate with hassfest + +on: + push: + pull_request: + # schedule: + # - cron: '0 0 * * mon' + +jobs: + validate: + runs-on: "ubuntu-latest" + steps: + - uses: "actions/checkout@v2" + - uses: "home-assistant/actions/hassfest@master" diff --git a/bin/update.sh b/bin/update.sh index 3bba8de..998553e 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -16,11 +16,11 @@ if [[ ! -d core ]]; then # Clone the repo max-depth of 1 commit as we only need the latest. git clone --depth 1 --recursive https://github.com/home-assistant/core/ - # Ensure that the core directory gets cleaned up on exit. - trap 'rm -rf ${START_DIR}/core' EXIT - fi +# Ensure that the core directory gets cleaned up on exit. +trap 'rm -rf ${START_DIR}/core' EXIT + # Create a variable for the source directory we are using. SRC_DIR="${START_DIR}/core/homeassistant/components/default_config" From c570e9a28e2b4cb10aba63156fb4984dae96f023 Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Tue, 27 Jun 2023 10:23:33 +0100 Subject: [PATCH 11/87] Added in dependabot auto-merges --- .github/dependabot.yml | 7 +++++++ .github/workflows/dependabot.yml | 21 +++++++++++++++++++++ .github/workflows/hassfest.yml | 2 +- 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..3f7fbb9 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + target-branch: "staging" + directory: "/" + schedule: + interval: "monthly" diff --git a/.github/workflows/dependabot.yml b/.github/workflows/dependabot.yml new file mode 100644 index 0000000..37a9784 --- /dev/null +++ b/.github/workflows/dependabot.yml @@ -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 diff --git a/.github/workflows/hassfest.yml b/.github/workflows/hassfest.yml index 914fb98..0dbdf61 100644 --- a/.github/workflows/hassfest.yml +++ b/.github/workflows/hassfest.yml @@ -10,5 +10,5 @@ jobs: validate: runs-on: "ubuntu-latest" steps: - - uses: "actions/checkout@v2" + - uses: "actions/checkout@v3" - uses: "home-assistant/actions/hassfest@master" From 76a2fa16e728840e24c9b155848d71b5218c901c Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Tue, 27 Jun 2023 10:28:18 +0100 Subject: [PATCH 12/87] Initial run --- bin/update.sh | 2 +- custom_components/default_config/__init__.py | 18 +++++++ .../default_config/manifest.json | 50 +++++++++++++++++++ 3 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 custom_components/default_config/__init__.py create mode 100644 custom_components/default_config/manifest.json diff --git a/bin/update.sh b/bin/update.sh index 998553e..ec28c7b 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -19,7 +19,7 @@ if [[ ! -d core ]]; then fi # Ensure that the core directory gets cleaned up on exit. -trap 'rm -rf ${START_DIR}/core' EXIT +trap "rm -rf "${START_DIR}/core"" EXIT # Create a variable for the source directory we are using. SRC_DIR="${START_DIR}/core/homeassistant/components/default_config" diff --git a/custom_components/default_config/__init__.py b/custom_components/default_config/__init__.py new file mode 100644 index 0000000..25a9ca3 --- /dev/null +++ b/custom_components/default_config/__init__.py @@ -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 diff --git a/custom_components/default_config/manifest.json b/custom_components/default_config/manifest.json new file mode 100644 index 0000000..7584d4b --- /dev/null +++ b/custom_components/default_config/manifest.json @@ -0,0 +1,50 @@ +{ + "version": "2023.6.3.1", + "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" +} From 0d7402c70e00782277b6edfa8a8d40076481aff9 Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Tue, 27 Jun 2023 10:39:42 +0100 Subject: [PATCH 13/87] Added issue templates/config. --- .github/ISSUE_TEMPLATE/bug.yaml | 59 +++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yaml | 1 + .github/ISSUE_TEMPLATE/feature_request.yaml | 49 +++++++++++++++++ 3 files changed, 109 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug.yaml create mode 100644 .github/ISSUE_TEMPLATE/config.yaml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yaml diff --git a/.github/ISSUE_TEMPLATE/bug.yaml b/.github/ISSUE_TEMPLATE/bug.yaml new file mode 100644 index 0000000..6cca9eb --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.yaml @@ -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)" diff --git a/.github/ISSUE_TEMPLATE/config.yaml b/.github/ISSUE_TEMPLATE/config.yaml new file mode 100644 index 0000000..3ba13e0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yaml @@ -0,0 +1 @@ +blank_issues_enabled: false diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml new file mode 100644 index 0000000..82e162a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -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 From 0261ffd0985f3e7c9ac96dab7aef52250ba393f2 Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Tue, 27 Jun 2023 11:04:39 +0100 Subject: [PATCH 14/87] Updated manifest to be alphabetical --- .github/workflows/HACS.yaml | 17 ----------------- .github/workflows/default_config.yaml | 8 ++++++++ .github/workflows/hassfest.yml | 14 -------------- bin/update.sh | 6 +++++- custom_components/default_config/manifest.json | 4 ++-- 5 files changed, 15 insertions(+), 34 deletions(-) delete mode 100644 .github/workflows/HACS.yaml delete mode 100644 .github/workflows/hassfest.yml diff --git a/.github/workflows/HACS.yaml b/.github/workflows/HACS.yaml deleted file mode 100644 index 8a27df1..0000000 --- a/.github/workflows/HACS.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: HACS Action - -on: - push: - pull_request: - # schedule: - # - cron: "0 0 * * mon" - -jobs: - hacs: - name: HACS Action - runs-on: "ubuntu-latest" - steps: - - name: HACS Action - uses: "hacs/action@main" - with: - category: "integration" diff --git a/.github/workflows/default_config.yaml b/.github/workflows/default_config.yaml index e4d165c..b3c22b7 100644 --- a/.github/workflows/default_config.yaml +++ b/.github/workflows/default_config.yaml @@ -34,6 +34,14 @@ jobs: 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" + - name: Save changes uses: stefanzweifel/git-auto-commit-action@v4 with: diff --git a/.github/workflows/hassfest.yml b/.github/workflows/hassfest.yml deleted file mode 100644 index 0dbdf61..0000000 --- a/.github/workflows/hassfest.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Validate with hassfest - -on: - push: - pull_request: - # schedule: - # - cron: '0 0 * * mon' - -jobs: - validate: - runs-on: "ubuntu-latest" - steps: - - uses: "actions/checkout@v3" - - uses: "home-assistant/actions/hassfest@master" diff --git a/bin/update.sh b/bin/update.sh index ec28c7b..ee47425 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -45,8 +45,12 @@ cd custom_components/default_config # Copy over the upstream files cp -Rpf "${START_DIR}/core/homeassistant/components/default_config" "${START_DIR}/custom_components" +# Calculate last line of file +LINE="$(grep --line-number '}' "${START_DIR}/custom_components/default_config/manifest.json" | awk -F ':' '{print $1}')" + # Add in required data for the component to get loaded -sed -i "2i \ \"version\": \"${HOME_ASSISTANT_CORE_LATEST_TAG}.1\"," "${START_DIR}/custom_components/default_config/manifest.json" +sed -i -r 's/^(\s+.+\:.*[^,]")$/\1,/' "${START_DIR}/custom_components/default_config/manifest.json" +sed -i "${LINE}i \ \"version\": \"${HOME_ASSISTANT_CORE_LATEST_TAG}.1\"" "${START_DIR}/custom_components/default_config/manifest.json" # Disable the 'cloud' integration. sed -i '/cloud/d' "${START_DIR}/custom_components/default_config/manifest.json" diff --git a/custom_components/default_config/manifest.json b/custom_components/default_config/manifest.json index 7584d4b..77a33ea 100644 --- a/custom_components/default_config/manifest.json +++ b/custom_components/default_config/manifest.json @@ -1,5 +1,4 @@ { - "version": "2023.6.3.1", "domain": "default_config", "name": "Default Config", "codeowners": ["@home-assistant/core"], @@ -46,5 +45,6 @@ ], "documentation": "https://www.home-assistant.io/integrations/default_config", "integration_type": "system", - "quality_scale": "internal" + "quality_scale": "internal", + "version": "2023.6.3.1" } From a998c2bdaf41b9297eb43baa8838081e9f36b113 Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Tue, 27 Jun 2023 11:08:57 +0100 Subject: [PATCH 15/87] Updated workflow trigger --- .github/workflows/default_config.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/default_config.yaml b/.github/workflows/default_config.yaml index b3c22b7..f27f904 100644 --- a/.github/workflows/default_config.yaml +++ b/.github/workflows/default_config.yaml @@ -4,6 +4,9 @@ on: workflow_dispatch: branches: - main + push: + branches: + - main schedule: - cron: "0 0 * * *" From f73500713c39df16c25d313d28976b6052b5077b Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Tue, 27 Jun 2023 11:11:49 +0100 Subject: [PATCH 16/87] added issue_tracker to manifest --- bin/update.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/update.sh b/bin/update.sh index ee47425..826e08d 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -51,6 +51,7 @@ LINE="$(grep --line-number '}' "${START_DIR}/custom_components/default_config/ma # Add in required data for the component to get loaded sed -i -r 's/^(\s+.+\:.*[^,]")$/\1,/' "${START_DIR}/custom_components/default_config/manifest.json" sed -i "${LINE}i \ \"version\": \"${HOME_ASSISTANT_CORE_LATEST_TAG}.1\"" "${START_DIR}/custom_components/default_config/manifest.json" +sed -i "${LINE}i \ \"issue_tracker\": \"https://github.com/home-assistant/core/issues\"" "${START_DIR}/custom_components/default_config/manifest.json" # Disable the 'cloud' integration. sed -i '/cloud/d' "${START_DIR}/custom_components/default_config/manifest.json" From 86cb6c8b7b0c7a88122a35025830d8e203ddc45f Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Tue, 27 Jun 2023 11:15:52 +0100 Subject: [PATCH 17/87] removed issue_tracker and HACS linting --- .github/workflows/default_config.yaml | 8 ++++---- bin/update.sh | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/default_config.yaml b/.github/workflows/default_config.yaml index f27f904..5765c1a 100644 --- a/.github/workflows/default_config.yaml +++ b/.github/workflows/default_config.yaml @@ -37,10 +37,10 @@ jobs: shell: bash run: "clone/bin/update.sh" - - name: HACS Action - uses: "hacs/action@main" - with: - category: "integration" + # - name: HACS Action + # uses: "hacs/action@main" + # with: + # category: "integration" - name: Home Assistant 'hassfest' Action uses: "home-assistant/actions/hassfest@master" diff --git a/bin/update.sh b/bin/update.sh index 826e08d..ee47425 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -51,7 +51,6 @@ LINE="$(grep --line-number '}' "${START_DIR}/custom_components/default_config/ma # Add in required data for the component to get loaded sed -i -r 's/^(\s+.+\:.*[^,]")$/\1,/' "${START_DIR}/custom_components/default_config/manifest.json" sed -i "${LINE}i \ \"version\": \"${HOME_ASSISTANT_CORE_LATEST_TAG}.1\"" "${START_DIR}/custom_components/default_config/manifest.json" -sed -i "${LINE}i \ \"issue_tracker\": \"https://github.com/home-assistant/core/issues\"" "${START_DIR}/custom_components/default_config/manifest.json" # Disable the 'cloud' integration. sed -i '/cloud/d' "${START_DIR}/custom_components/default_config/manifest.json" From 0277e6474250368977ee7d28a558e1ffef3f3b41 Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Tue, 27 Jun 2023 11:19:36 +0100 Subject: [PATCH 18/87] Disabled linting --- .github/workflows/default_config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/default_config.yaml b/.github/workflows/default_config.yaml index 5765c1a..d0559f8 100644 --- a/.github/workflows/default_config.yaml +++ b/.github/workflows/default_config.yaml @@ -42,8 +42,8 @@ jobs: # with: # category: "integration" - - name: Home Assistant 'hassfest' Action - uses: "home-assistant/actions/hassfest@master" + # - name: Home Assistant 'hassfest' Action + # uses: "home-assistant/actions/hassfest@master" - name: Save changes uses: stefanzweifel/git-auto-commit-action@v4 From 17b4c02007eec2121502a901c45b5d815684d287 Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Wed, 5 Jul 2023 16:15:24 +0100 Subject: [PATCH 19/87] Get latest TAG from upstream --- .github/workflows/default_config.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/default_config.yaml b/.github/workflows/default_config.yaml index d0559f8..1c331a7 100644 --- a/.github/workflows/default_config.yaml +++ b/.github/workflows/default_config.yaml @@ -33,6 +33,13 @@ jobs: repository: "home-assistant/core" path: "core" + - uses: oprypin/find-latest-tag@v1 + with: + repository: home-assistant/core/ + id: latest_tag + + - run: echo "latest_tag is ${{ steps.latest_tag.outputs.tag }}" + - name: Update files via script shell: bash run: "clone/bin/update.sh" @@ -50,3 +57,9 @@ jobs: with: commit_message: Apply default_config changes repository: clone + + - uses: rickstaa/action-create-tag@v1 + with: + tag: "latest" + tag_exists_error: false + message: "Latest release" From 69c83698887f230b5269e949a85f936c66e6f98b Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Wed, 5 Jul 2023 16:16:19 +0100 Subject: [PATCH 20/87] Get latest TAG from upstream --- .github/workflows/default_config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/default_config.yaml b/.github/workflows/default_config.yaml index 1c331a7..34fc59a 100644 --- a/.github/workflows/default_config.yaml +++ b/.github/workflows/default_config.yaml @@ -35,7 +35,7 @@ jobs: - uses: oprypin/find-latest-tag@v1 with: - repository: home-assistant/core/ + repository: home-assistant/core id: latest_tag - run: echo "latest_tag is ${{ steps.latest_tag.outputs.tag }}" From bd4ab739b1f6c35beeec9a579e26214831f876ba Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Wed, 5 Jul 2023 16:18:27 +0100 Subject: [PATCH 21/87] Get latest TAG from upstream --- .github/workflows/default_config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/default_config.yaml b/.github/workflows/default_config.yaml index 34fc59a..832c64d 100644 --- a/.github/workflows/default_config.yaml +++ b/.github/workflows/default_config.yaml @@ -36,6 +36,7 @@ jobs: - uses: oprypin/find-latest-tag@v1 with: repository: home-assistant/core + releases-only: true id: latest_tag - run: echo "latest_tag is ${{ steps.latest_tag.outputs.tag }}" From 6376f6a7984ce37c3ee5b7b068c2e551e4e4ee81 Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Wed, 5 Jul 2023 16:23:46 +0100 Subject: [PATCH 22/87] Get latest TAG from upstream --- .github/workflows/default_config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/default_config.yaml b/.github/workflows/default_config.yaml index 832c64d..615e6e4 100644 --- a/.github/workflows/default_config.yaml +++ b/.github/workflows/default_config.yaml @@ -33,9 +33,9 @@ jobs: repository: "home-assistant/core" path: "core" - - uses: oprypin/find-latest-tag@v1 + - uses: cardinalby/git-get-release-action@v1 with: - repository: home-assistant/core + repo: home-assistant/core releases-only: true id: latest_tag From bfb65c0f31e7ec334a62ef6e0658b1345591e2c5 Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Wed, 5 Jul 2023 16:24:55 +0100 Subject: [PATCH 23/87] Get latest TAG from upstream --- .github/workflows/default_config.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/default_config.yaml b/.github/workflows/default_config.yaml index 615e6e4..31f312c 100644 --- a/.github/workflows/default_config.yaml +++ b/.github/workflows/default_config.yaml @@ -34,6 +34,8 @@ jobs: path: "core" - uses: cardinalby/git-get-release-action@v1 + env: + GITHUB_TOKEN: ${{ github.token }} with: repo: home-assistant/core releases-only: true From cb851d837b7b6c9f1bc6f67e388434edfd8c0483 Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Wed, 5 Jul 2023 16:28:41 +0100 Subject: [PATCH 24/87] Get latest TAG from upstream --- .github/workflows/default_config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/default_config.yaml b/.github/workflows/default_config.yaml index 31f312c..110830a 100644 --- a/.github/workflows/default_config.yaml +++ b/.github/workflows/default_config.yaml @@ -38,6 +38,7 @@ jobs: GITHUB_TOKEN: ${{ github.token }} with: repo: home-assistant/core + releaseNameRegEx: "^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)" releases-only: true id: latest_tag From c0bb424965a0784fe7d9ea8c603a94f015f77931 Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Wed, 5 Jul 2023 16:30:48 +0100 Subject: [PATCH 25/87] Get latest TAG from upstream --- .github/workflows/default_config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/default_config.yaml b/.github/workflows/default_config.yaml index 110830a..007080f 100644 --- a/.github/workflows/default_config.yaml +++ b/.github/workflows/default_config.yaml @@ -38,7 +38,7 @@ jobs: GITHUB_TOKEN: ${{ github.token }} with: repo: home-assistant/core - releaseNameRegEx: "^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)" + releaseNameRegEx: '^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)' releases-only: true id: latest_tag From 7e95293787ca4ea26f3c75a21681816937e1389d Mon Sep 17 00:00:00 2001 From: richard-scott Date: Wed, 5 Jul 2023 15:31:22 +0000 Subject: [PATCH 26/87] Apply default_config changes --- custom_components/default_config/manifest.json | 2 +- hacs.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/default_config/manifest.json b/custom_components/default_config/manifest.json index 77a33ea..361abd8 100644 --- a/custom_components/default_config/manifest.json +++ b/custom_components/default_config/manifest.json @@ -46,5 +46,5 @@ "documentation": "https://www.home-assistant.io/integrations/default_config", "integration_type": "system", "quality_scale": "internal", - "version": "2023.6.3.1" + "version": "2023.7.0.1" } diff --git a/hacs.json b/hacs.json index 3bc8a93..89cb122 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,5 @@ { "name": "Home Assistant Cloud Hider", "render_readme": true, - "homeassistant": "2023.6.3" + "homeassistant": "2023.7.0" } From fec8b5b504665dc02084f715873a68987ce397ab Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Wed, 5 Jul 2023 16:34:16 +0100 Subject: [PATCH 27/87] Get latest TAG from upstream --- .github/workflows/default_config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/default_config.yaml b/.github/workflows/default_config.yaml index 007080f..383626b 100644 --- a/.github/workflows/default_config.yaml +++ b/.github/workflows/default_config.yaml @@ -42,7 +42,7 @@ jobs: releases-only: true id: latest_tag - - run: echo "latest_tag is ${{ steps.latest_tag.outputs.tag }}" + - run: echo "latest_tag is ${{ steps.latest_tag.outputs.name }}" - name: Update files via script shell: bash From 30e4816ccac732037b0e734405161b729904aa15 Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Wed, 5 Jul 2023 16:37:29 +0100 Subject: [PATCH 28/87] Get latest TAG from upstream --- .github/workflows/default_config.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/default_config.yaml b/.github/workflows/default_config.yaml index 383626b..068ec11 100644 --- a/.github/workflows/default_config.yaml +++ b/.github/workflows/default_config.yaml @@ -42,7 +42,7 @@ jobs: releases-only: true id: latest_tag - - run: echo "latest_tag is ${{ steps.latest_tag.outputs.name }}" + - run: echo "latest_tag is " - name: Update files via script shell: bash @@ -64,6 +64,5 @@ jobs: - uses: rickstaa/action-create-tag@v1 with: - tag: "latest" + tag: "${{ steps.latest_tag.outputs.name }}" tag_exists_error: false - message: "Latest release" From de4cb349db0441370ced5f250079dfe5dfd7cd5f Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Wed, 5 Jul 2023 16:41:46 +0100 Subject: [PATCH 29/87] Get latest TAG from upstream --- .github/workflows/default_config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/default_config.yaml b/.github/workflows/default_config.yaml index 068ec11..0efd892 100644 --- a/.github/workflows/default_config.yaml +++ b/.github/workflows/default_config.yaml @@ -42,8 +42,6 @@ jobs: releases-only: true id: latest_tag - - run: echo "latest_tag is " - - name: Update files via script shell: bash run: "clone/bin/update.sh" @@ -62,6 +60,8 @@ jobs: commit_message: Apply default_config changes repository: clone + - run: cd clone + - uses: rickstaa/action-create-tag@v1 with: tag: "${{ steps.latest_tag.outputs.name }}" From 6f49080cb111e39608e8051213d102cecd6a9eb8 Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Wed, 5 Jul 2023 16:46:58 +0100 Subject: [PATCH 30/87] Get latest TAG from upstream --- .github/workflows/default_config.yaml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/default_config.yaml b/.github/workflows/default_config.yaml index 0efd892..e57490f 100644 --- a/.github/workflows/default_config.yaml +++ b/.github/workflows/default_config.yaml @@ -59,10 +59,4 @@ jobs: with: commit_message: Apply default_config changes repository: clone - - - run: cd clone - - - uses: rickstaa/action-create-tag@v1 - with: - tag: "${{ steps.latest_tag.outputs.name }}" - tag_exists_error: false + tagging_message: "${{ steps.latest_tag.outputs.name }}" From 86d4c9029d753198329ef0a907b1a0dcb3c1debb Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Wed, 5 Jul 2023 16:48:30 +0100 Subject: [PATCH 31/87] Added delete script --- bin/delete-workflow-run-history | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 bin/delete-workflow-run-history diff --git a/bin/delete-workflow-run-history b/bin/delete-workflow-run-history new file mode 100755 index 0000000..4259dba --- /dev/null +++ b/bin/delete-workflow-run-history @@ -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 From abc257a020d53e2c61cede00b05b214880f0f831 Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Wed, 5 Jul 2023 16:50:44 +0100 Subject: [PATCH 32/87] Get latest TAG from upstream. From 2cc051693d4ac5bb6609020f3c2b4dc792800377 Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Wed, 5 Jul 2023 16:56:37 +0100 Subject: [PATCH 33/87] Get latest TAG from upstream. --- .github/workflows/default_config.yaml | 34 ++++++++++++++++++--------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/.github/workflows/default_config.yaml b/.github/workflows/default_config.yaml index e57490f..6007a89 100644 --- a/.github/workflows/default_config.yaml +++ b/.github/workflows/default_config.yaml @@ -33,15 +33,6 @@ jobs: repository: "home-assistant/core" path: "core" - - uses: cardinalby/git-get-release-action@v1 - env: - GITHUB_TOKEN: ${{ github.token }} - with: - repo: home-assistant/core - releaseNameRegEx: '^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)' - releases-only: true - id: latest_tag - - name: Update files via script shell: bash run: "clone/bin/update.sh" @@ -54,9 +45,30 @@ jobs: # - name: Home Assistant 'hassfest' Action # uses: "home-assistant/actions/hassfest@master" - - name: Save changes - uses: stefanzweifel/git-auto-commit-action@v4 + - uses: stefanzweifel/git-auto-commit-action@v4 with: commit_message: Apply default_config changes repository: clone + + tag: + runs-on: ubuntu-latest + + permissions: write-all + + steps: + - name: "Checkout ${{ github.head_ref }}" + uses: actions/checkout@v3 + + - uses: cardinalby/git-get-release-action@v1 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + repo: home-assistant/core + releaseNameRegEx: '^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)' + releases-only: true + id: latest_tag + + - uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: "Generate Tag ${{ steps.latest_tag.outputs.name }}" tagging_message: "${{ steps.latest_tag.outputs.name }}" From 8e5f8eed1d493500e0c4eb2d587ee8800739c21b Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Wed, 5 Jul 2023 16:58:41 +0100 Subject: [PATCH 34/87] Get latest TAG from upstream. --- .github/workflows/default_config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/default_config.yaml b/.github/workflows/default_config.yaml index 6007a89..b3687c1 100644 --- a/.github/workflows/default_config.yaml +++ b/.github/workflows/default_config.yaml @@ -54,7 +54,8 @@ jobs: runs-on: ubuntu-latest permissions: write-all - + needs: + - build steps: - name: "Checkout ${{ github.head_ref }}" uses: actions/checkout@v3 @@ -65,7 +66,6 @@ jobs: with: repo: home-assistant/core releaseNameRegEx: '^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)' - releases-only: true id: latest_tag - uses: stefanzweifel/git-auto-commit-action@v4 From 8222a66f6f50faeb800fb6c7e3fc4d525aff59e2 Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Wed, 5 Jul 2023 17:09:32 +0100 Subject: [PATCH 35/87] Get latest TAG from upstream. --- .github/workflows/default_config.yaml | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/.github/workflows/default_config.yaml b/.github/workflows/default_config.yaml index b3687c1..a46555c 100644 --- a/.github/workflows/default_config.yaml +++ b/.github/workflows/default_config.yaml @@ -45,21 +45,6 @@ jobs: # - name: Home Assistant 'hassfest' Action # uses: "home-assistant/actions/hassfest@master" - - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: Apply default_config changes - repository: clone - - tag: - runs-on: ubuntu-latest - - permissions: write-all - needs: - - build - steps: - - name: "Checkout ${{ github.head_ref }}" - uses: actions/checkout@v3 - - uses: cardinalby/git-get-release-action@v1 env: GITHUB_TOKEN: ${{ github.token }} @@ -70,5 +55,6 @@ jobs: - uses: stefanzweifel/git-auto-commit-action@v4 with: - commit_message: "Generate Tag ${{ steps.latest_tag.outputs.name }}" + commit_message: Apply default_config changes + repository: clone tagging_message: "${{ steps.latest_tag.outputs.name }}" From 10494790510e591b7171631c0bd890beacb8ce9d Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Wed, 5 Jul 2023 17:11:36 +0100 Subject: [PATCH 36/87] Get latest TAG from upstream. --- .github/workflows/default_config.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/default_config.yaml b/.github/workflows/default_config.yaml index a46555c..f4175cf 100644 --- a/.github/workflows/default_config.yaml +++ b/.github/workflows/default_config.yaml @@ -55,6 +55,5 @@ jobs: - uses: stefanzweifel/git-auto-commit-action@v4 with: - commit_message: Apply default_config changes repository: clone tagging_message: "${{ steps.latest_tag.outputs.name }}" From f1efbc8326ac13dd3f943f9a1df75147046973ef Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Wed, 5 Jul 2023 17:15:11 +0100 Subject: [PATCH 37/87] Get latest TAG from upstream. --- .github/workflows/default_config.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/default_config.yaml b/.github/workflows/default_config.yaml index f4175cf..523fcc0 100644 --- a/.github/workflows/default_config.yaml +++ b/.github/workflows/default_config.yaml @@ -56,4 +56,13 @@ jobs: - uses: stefanzweifel/git-auto-commit-action@v4 with: repository: clone - tagging_message: "${{ steps.latest_tag.outputs.name }}" + + - name: Create Release + uses: actions/create-release@latest + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: "${{ steps.latest_tag.outputs.name }}" + release_name: "Release ${{ steps.latest_tag.outputs.name }}" + draft: false + prerelease: false From 3d0dfa4f4614c5047d37eab6dccda6d14c85cc77 Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Wed, 5 Jul 2023 17:16:00 +0100 Subject: [PATCH 38/87] Get latest TAG from upstream. --- .github/workflows/default_config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/default_config.yaml b/.github/workflows/default_config.yaml index 523fcc0..0b64a69 100644 --- a/.github/workflows/default_config.yaml +++ b/.github/workflows/default_config.yaml @@ -59,8 +59,8 @@ jobs: - name: Create Release uses: actions/create-release@latest - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token with: tag_name: "${{ steps.latest_tag.outputs.name }}" release_name: "Release ${{ steps.latest_tag.outputs.name }}" From ada2697e9ee40044f1975395bd40c85d3ca573e7 Mon Sep 17 00:00:00 2001 From: richard-scott Date: Fri, 7 Jul 2023 01:09:08 +0000 Subject: [PATCH 39/87] Apply automatic changes --- custom_components/default_config/manifest.json | 2 +- hacs.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/default_config/manifest.json b/custom_components/default_config/manifest.json index 361abd8..e6078cc 100644 --- a/custom_components/default_config/manifest.json +++ b/custom_components/default_config/manifest.json @@ -46,5 +46,5 @@ "documentation": "https://www.home-assistant.io/integrations/default_config", "integration_type": "system", "quality_scale": "internal", - "version": "2023.7.0.1" + "version": "2023.7.1.1" } diff --git a/hacs.json b/hacs.json index 89cb122..e045ef2 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,5 @@ { "name": "Home Assistant Cloud Hider", "render_readme": true, - "homeassistant": "2023.7.0" + "homeassistant": "2023.7.1" } From 7ec9e064b916a219b8a177c0ece45b768304bf23 Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Sat, 8 Jul 2023 21:50:28 +0100 Subject: [PATCH 40/87] Changed GH Action for release creation. --- .github/workflows/default_config.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/default_config.yaml b/.github/workflows/default_config.yaml index 0b64a69..ef8d7db 100644 --- a/.github/workflows/default_config.yaml +++ b/.github/workflows/default_config.yaml @@ -58,11 +58,10 @@ jobs: repository: clone - name: Create Release - uses: actions/create-release@latest + uses: ncipollo/release-action@v1.12.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token with: - tag_name: "${{ steps.latest_tag.outputs.name }}" - release_name: "Release ${{ steps.latest_tag.outputs.name }}" - draft: false - prerelease: false + skipIfReleaseExists: true + tag: "${{ steps.latest_tag.outputs.name }}" + name: "Release ${{ steps.latest_tag.outputs.name }}" From d8ecf665cda21b6244f8c138f30d31640e598d20 Mon Sep 17 00:00:00 2001 From: richard-scott Date: Fri, 14 Jul 2023 01:07:40 +0000 Subject: [PATCH 41/87] Apply automatic changes --- custom_components/default_config/manifest.json | 2 +- hacs.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/default_config/manifest.json b/custom_components/default_config/manifest.json index e6078cc..7a00056 100644 --- a/custom_components/default_config/manifest.json +++ b/custom_components/default_config/manifest.json @@ -46,5 +46,5 @@ "documentation": "https://www.home-assistant.io/integrations/default_config", "integration_type": "system", "quality_scale": "internal", - "version": "2023.7.1.1" + "version": "2023.7.2.1" } diff --git a/hacs.json b/hacs.json index e045ef2..1018201 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,5 @@ { "name": "Home Assistant Cloud Hider", "render_readme": true, - "homeassistant": "2023.7.1" + "homeassistant": "2023.7.2" } From 138c1f3785f6911532179303a42dee1b29017573 Mon Sep 17 00:00:00 2001 From: richard-scott Date: Sat, 22 Jul 2023 00:58:23 +0000 Subject: [PATCH 42/87] Apply automatic changes --- custom_components/default_config/manifest.json | 2 +- hacs.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/default_config/manifest.json b/custom_components/default_config/manifest.json index 7a00056..1c8a4ee 100644 --- a/custom_components/default_config/manifest.json +++ b/custom_components/default_config/manifest.json @@ -46,5 +46,5 @@ "documentation": "https://www.home-assistant.io/integrations/default_config", "integration_type": "system", "quality_scale": "internal", - "version": "2023.7.2.1" + "version": "2023.7.3.1" } diff --git a/hacs.json b/hacs.json index 1018201..fcd13f0 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,5 @@ { "name": "Home Assistant Cloud Hider", "render_readme": true, - "homeassistant": "2023.7.2" + "homeassistant": "2023.7.3" } From 3d7e62d82cd6c5935e54f902b02144452b2da3ca Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Fri, 28 Jul 2023 18:25:40 +0100 Subject: [PATCH 43/87] Changed regex for finding last tag upstream. --- bin/update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/update.sh b/bin/update.sh index ee47425..1c5ea47 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -8,7 +8,7 @@ START_DIR="${PWD}" 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)" +HOME_ASSISTANT_CORE_LATEST_TAG="$(curl -Ls https://api.github.com/repos/home-assistant/core/tags | jq '.[].name' | sed 's/"//g' | sort -V | grep -E '\d{4}\.\d\.\d$' | tail -n 1)" # If we haven't already checked out the repo, do so now. if [[ ! -d core ]]; then From 27a1a637dcae97da5fd0efe86c5f0e8f2520621d Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Fri, 28 Jul 2023 18:47:00 +0100 Subject: [PATCH 44/87] Changed regex for finding last tag upstream. --- bin/update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/update.sh b/bin/update.sh index 1c5ea47..f10942a 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -8,7 +8,7 @@ START_DIR="${PWD}" 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' | sort -V | grep -E '\d{4}\.\d\.\d$' | tail -n 1)" +HOME_ASSISTANT_CORE_LATEST_TAG="$(curl -Ls https://api.github.com/repos/home-assistant/core/tags | jq '.[].name' | sed 's/\"//g' | sort -V | grep -E '\d{4}\.\d\.\d$' | tail -n 1)" # If we haven't already checked out the repo, do so now. if [[ ! -d core ]]; then From bfbbc5b03c8dc553a1707aa0d6f2d476369eb31f Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Fri, 28 Jul 2023 19:59:13 +0100 Subject: [PATCH 45/87] Changed to jq for updating json --- bin/update.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/update.sh b/bin/update.sh index f10942a..ab2433a 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -49,7 +49,8 @@ cp -Rpf "${START_DIR}/core/homeassistant/components/default_config" "${START_DIR LINE="$(grep --line-number '}' "${START_DIR}/custom_components/default_config/manifest.json" | awk -F ':' '{print $1}')" # Add in required data for the component to get loaded -sed -i -r 's/^(\s+.+\:.*[^,]")$/\1,/' "${START_DIR}/custom_components/default_config/manifest.json" +# sed -i -r 's/^(\s+.+\:.*[^,]")$/\1,/' "${START_DIR}/custom_components/default_config/manifest.json" +cat <<<$(jq '. + { "version": "1.2.3.4" }' custom_components/default_config/manifest.json) >custom_components/default_config/manifest.json sed -i "${LINE}i \ \"version\": \"${HOME_ASSISTANT_CORE_LATEST_TAG}.1\"" "${START_DIR}/custom_components/default_config/manifest.json" # Disable the 'cloud' integration. From c928fbcb721c91fcc5771bb466a15005d56a4929 Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Fri, 28 Jul 2023 20:13:35 +0100 Subject: [PATCH 46/87] Changed to jq for updating json --- bin/update.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/update.sh b/bin/update.sh index ab2433a..0df5990 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -50,7 +50,8 @@ LINE="$(grep --line-number '}' "${START_DIR}/custom_components/default_config/ma # Add in required data for the component to get loaded # sed -i -r 's/^(\s+.+\:.*[^,]")$/\1,/' "${START_DIR}/custom_components/default_config/manifest.json" -cat <<<$(jq '. + { "version": "1.2.3.4" }' custom_components/default_config/manifest.json) >custom_components/default_config/manifest.json +cat <<<$(jq '. + { "version": "1.2.3.4" }' custom_components/default_config/manifest.json) >${START_DIR}custom_components/default_config/manifest.json + sed -i "${LINE}i \ \"version\": \"${HOME_ASSISTANT_CORE_LATEST_TAG}.1\"" "${START_DIR}/custom_components/default_config/manifest.json" # Disable the 'cloud' integration. From 33c7020767398ccd0089a784114f183be4dfcfe3 Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Sat, 29 Jul 2023 18:51:37 +0100 Subject: [PATCH 47/87] Changed to jq for updating json --- bin/update.sh | 8 ++- custom_components/default_config/__init__.py | 18 ------- .../default_config/manifest.json | 50 ------------------- hacs.json | 6 +-- 4 files changed, 4 insertions(+), 78 deletions(-) delete mode 100644 custom_components/default_config/__init__.py delete mode 100644 custom_components/default_config/manifest.json diff --git a/bin/update.sh b/bin/update.sh index 0df5990..a230f79 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -50,12 +50,10 @@ LINE="$(grep --line-number '}' "${START_DIR}/custom_components/default_config/ma # Add in required data for the component to get loaded # sed -i -r 's/^(\s+.+\:.*[^,]")$/\1,/' "${START_DIR}/custom_components/default_config/manifest.json" -cat <<<$(jq '. + { "version": "1.2.3.4" }' custom_components/default_config/manifest.json) >${START_DIR}custom_components/default_config/manifest.json - -sed -i "${LINE}i \ \"version\": \"${HOME_ASSISTANT_CORE_LATEST_TAG}.1\"" "${START_DIR}/custom_components/default_config/manifest.json" +cat <<<$(jq '. + { "version": "1.2.3.4" }' ${START_DIR}/custom_components/default_config/manifest.json) >${START_DIR}/custom_components/default_config/manifest.json # Disable the 'cloud' integration. -sed -i '/cloud/d' "${START_DIR}/custom_components/default_config/manifest.json" +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 -sed -i "s/$(cat "${START_DIR}/hacs.json" | grep homeassistant | awk '{print $2}')/\"${HOME_ASSISTANT_CORE_LATEST_TAG}\"/" "${START_DIR}/hacs.json" +cat <<<$(jq ".homeassistant = \"${HOME_ASSISTANT_CORE_LATEST_TAG}\"" ${START_DIR}/hacs.json) >${START_DIR}/hacs.json diff --git a/custom_components/default_config/__init__.py b/custom_components/default_config/__init__.py deleted file mode 100644 index 25a9ca3..0000000 --- a/custom_components/default_config/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -"""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 diff --git a/custom_components/default_config/manifest.json b/custom_components/default_config/manifest.json deleted file mode 100644 index 1c8a4ee..0000000 --- a/custom_components/default_config/manifest.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "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.7.3.1" -} diff --git a/hacs.json b/hacs.json index fcd13f0..4b6e72f 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1 @@ -{ - "name": "Home Assistant Cloud Hider", - "render_readme": true, - "homeassistant": "2023.7.3" -} +{ "name": "Home Assistant Cloud Hider", "render_readme": true, "homeassistant": "2023.7.3" } From 3570049970b5a4a96f07e01a0134037a02046dee Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Sat, 29 Jul 2023 18:55:11 +0100 Subject: [PATCH 48/87] Changed to jq for updating json --- bin/update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/update.sh b/bin/update.sh index a230f79..9376349 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -x # Move to a known location and save as START_DIR. cd "$(dirname "$(dirname "${0}")")" || exit 1 From 809d8764ce355b900248182d53574b2d54245220 Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Sat, 29 Jul 2023 19:05:25 +0100 Subject: [PATCH 49/87] Changed to jq for updating json --- bin/update.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/update.sh b/bin/update.sh index 9376349..aa724f5 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -7,9 +7,6 @@ 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' | sort -V | grep -E '\d{4}\.\d\.\d$' | tail -n 1)" - # If we haven't already checked out the repo, do so now. if [[ ! -d core ]]; then @@ -19,7 +16,7 @@ if [[ ! -d core ]]; then fi # Ensure that the core directory gets cleaned up on exit. -trap "rm -rf "${START_DIR}/core"" EXIT +# trap "rm -rf "${START_DIR}/core"" EXIT # Create a variable for the source directory we are using. SRC_DIR="${START_DIR}/core/homeassistant/components/default_config" @@ -33,6 +30,9 @@ if [ -d clone ]; then cd clone fi +# Get the latest tag from the GitHub API. +HOME_ASSISTANT_CORE_LATEST_TAG="$(git ls-remote --tags 2>/dev/null | awk -F 'refs/tags/' '{print $2}' | sort -V | grep -E '\d{4}\.\d\.\d$' | tail -n 1)" + # Clean out the old data if it exists. if [[ -d custom_components ]]; then rm -rf custom_components From d8fd495caabc29af4df2abc1289c800c2aa2c474 Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Sat, 29 Jul 2023 19:10:17 +0100 Subject: [PATCH 50/87] Changed to jq for updating json --- bin/update.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/update.sh b/bin/update.sh index aa724f5..e10eb51 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -16,7 +16,7 @@ if [[ ! -d core ]]; then fi # Ensure that the core directory gets cleaned up on exit. -# trap "rm -rf "${START_DIR}/core"" EXIT +trap "rm -rf "${START_DIR}/core"" EXIT # Create a variable for the source directory we are using. SRC_DIR="${START_DIR}/core/homeassistant/components/default_config" @@ -34,6 +34,7 @@ fi HOME_ASSISTANT_CORE_LATEST_TAG="$(git ls-remote --tags 2>/dev/null | awk -F 'refs/tags/' '{print $2}' | sort -V | grep -E '\d{4}\.\d\.\d$' | tail -n 1)" # Clean out the old data if it exists. +cd "${START_DIR}" if [[ -d custom_components ]]; then rm -rf custom_components fi From d7831436c72863640cf1df6acf35176e483460c9 Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Sat, 29 Jul 2023 19:14:00 +0100 Subject: [PATCH 51/87] Changed to jq for updating json --- bin/update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/update.sh b/bin/update.sh index e10eb51..8286537 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -51,7 +51,7 @@ LINE="$(grep --line-number '}' "${START_DIR}/custom_components/default_config/ma # Add in required data for the component to get loaded # sed -i -r 's/^(\s+.+\:.*[^,]")$/\1,/' "${START_DIR}/custom_components/default_config/manifest.json" -cat <<<$(jq '. + { "version": "1.2.3.4" }' ${START_DIR}/custom_components/default_config/manifest.json) >${START_DIR}/custom_components/default_config/manifest.json +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 From 1f4f0e67c4bb27d524c71555c5d3ce2ff655c25b Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Sat, 29 Jul 2023 19:16:33 +0100 Subject: [PATCH 52/87] Updating tags code --- bin/update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/update.sh b/bin/update.sh index 8286537..6f55e69 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -31,7 +31,7 @@ if [ -d clone ]; then fi # Get the latest tag from the GitHub API. -HOME_ASSISTANT_CORE_LATEST_TAG="$(git ls-remote --tags 2>/dev/null | awk -F 'refs/tags/' '{print $2}' | sort -V | grep -E '\d{4}\.\d\.\d$' | tail -n 1)" +HOME_ASSISTANT_CORE_LATEST_TAG="$(git ls-remote --tags origin 2>/dev/null | awk -F 'refs/tags/' '{print $2}' | sort -V | grep -E '\d{4}\.\d\.\d$' | tail -n 1)" # Clean out the old data if it exists. cd "${START_DIR}" From 66dd509cbfab349778d6e3013acd947e02af4412 Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Sat, 29 Jul 2023 19:18:34 +0100 Subject: [PATCH 53/87] Updating tags code --- bin/update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/update.sh b/bin/update.sh index 6f55e69..da40230 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -31,7 +31,7 @@ if [ -d clone ]; then fi # Get the latest tag from the GitHub API. -HOME_ASSISTANT_CORE_LATEST_TAG="$(git ls-remote --tags origin 2>/dev/null | awk -F 'refs/tags/' '{print $2}' | sort -V | grep -E '\d{4}\.\d\.\d$' | tail -n 1)" +HOME_ASSISTANT_CORE_LATEST_TAG="$(git ls-remote --tags origin | awk -F 'refs/tags/' '{print $2}' | sort -V | grep -E '\d{4}\.\d\.\d$' | tail -n 1)" # Clean out the old data if it exists. cd "${START_DIR}" From d54461f5f4eb56f9f3a0316f34009756f8398df3 Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Sat, 29 Jul 2023 19:20:50 +0100 Subject: [PATCH 54/87] added debug code --- bin/update.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/update.sh b/bin/update.sh index da40230..e8e58a3 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -31,6 +31,7 @@ if [ -d clone ]; then fi # Get the latest tag from the GitHub API. +git ls-remote --tags origin HOME_ASSISTANT_CORE_LATEST_TAG="$(git ls-remote --tags origin | awk -F 'refs/tags/' '{print $2}' | sort -V | grep -E '\d{4}\.\d\.\d$' | tail -n 1)" # Clean out the old data if it exists. From 8b3792adac7a6bf3611c34a5c001612f947aad65 Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Sat, 29 Jul 2023 19:24:34 +0100 Subject: [PATCH 55/87] removed debug code --- bin/update.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/update.sh b/bin/update.sh index e8e58a3..01fe5d5 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -31,8 +31,7 @@ if [ -d clone ]; then fi # Get the latest tag from the GitHub API. -git ls-remote --tags origin -HOME_ASSISTANT_CORE_LATEST_TAG="$(git ls-remote --tags origin | awk -F 'refs/tags/' '{print $2}' | sort -V | grep -E '\d{4}\.\d\.\d$' | tail -n 1)" +HOME_ASSISTANT_CORE_LATEST_TAG="$(git ls-remote --tags origin 2>&1 | awk -F 'refs/tags/' '{print $2}' | sort -V | grep -E '\d{4}\.\d\.\d$' | tail -n 1)" # Clean out the old data if it exists. cd "${START_DIR}" From 289c6e8262afae43e6fe39eb5391b45861cb47f8 Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Sat, 29 Jul 2023 19:27:06 +0100 Subject: [PATCH 56/87] Updated git clone command --- bin/update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/update.sh b/bin/update.sh index 01fe5d5..8f4c743 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -11,7 +11,7 @@ set -e -o pipefail if [[ ! -d core ]]; then # Clone the repo max-depth of 1 commit as we only need the latest. - git clone --depth 1 --recursive https://github.com/home-assistant/core/ + git clone https://github.com/home-assistant/core/ fi From 54214dffcc448e521bcd3a238372c82878f33881 Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Sat, 29 Jul 2023 19:35:03 +0100 Subject: [PATCH 57/87] Updated git clone command --- bin/update.sh | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/bin/update.sh b/bin/update.sh index 8f4c743..419fee2 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -13,10 +13,10 @@ if [[ ! -d core ]]; then # Clone the repo max-depth of 1 commit as we only need the latest. git clone https://github.com/home-assistant/core/ -fi + # Ensure that the core directory gets cleaned up on exit. + trap "rm -rf "${START_DIR}/core"" EXIT -# Ensure that the core directory gets cleaned up on exit. -trap "rm -rf "${START_DIR}/core"" EXIT +fi # Create a variable for the source directory we are using. SRC_DIR="${START_DIR}/core/homeassistant/components/default_config" @@ -24,33 +24,24 @@ SRC_DIR="${START_DIR}/core/homeassistant/components/default_config" # Check the source directory exists test -d "${SRC_DIR}" || exit 1 -# If we have a 'clone' directory then we are running via GitHub Actions -# so change to that directory to have a consistent path structure for the following code. -if [ -d clone ]; then - cd clone -fi - # Get the latest tag from the GitHub API. -HOME_ASSISTANT_CORE_LATEST_TAG="$(git ls-remote --tags origin 2>&1 | awk -F 'refs/tags/' '{print $2}' | sort -V | grep -E '\d{4}\.\d\.\d$' | tail -n 1)" +HOME_ASSISTANT_CORE_LATEST_TAG="$( + cd ${START_DIR}/clone + git ls-remote --tags origin 2>&1 | awk -F 'refs/tags/' '{print $2}' | sort -V | grep -E '\d{4}\.\d\.\d$' | tail -n 1 +)" # Clean out the old data if it exists. -cd "${START_DIR}" if [[ -d custom_components ]]; then rm -rf custom_components fi # Create somewhere for our updated code to go. mkdir -p custom_components/default_config -cd custom_components/default_config # Copy over the upstream files cp -Rpf "${START_DIR}/core/homeassistant/components/default_config" "${START_DIR}/custom_components" -# Calculate last line of file -LINE="$(grep --line-number '}' "${START_DIR}/custom_components/default_config/manifest.json" | awk -F ':' '{print $1}')" - # Add in required data for the component to get loaded -# sed -i -r 's/^(\s+.+\:.*[^,]")$/\1,/' "${START_DIR}/custom_components/default_config/manifest.json" 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. From 7ac4736bf450be8415d5f67dfbee0b60a1c64b90 Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Sat, 29 Jul 2023 19:39:04 +0100 Subject: [PATCH 58/87] Restoring tag code --- bin/update.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/bin/update.sh b/bin/update.sh index 419fee2..b06e04a 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -7,6 +7,9 @@ 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 we haven't already checked out the repo, do so now. if [[ ! -d core ]]; then @@ -24,12 +27,6 @@ SRC_DIR="${START_DIR}/core/homeassistant/components/default_config" # Check the source directory exists test -d "${SRC_DIR}" || exit 1 -# Get the latest tag from the GitHub API. -HOME_ASSISTANT_CORE_LATEST_TAG="$( - cd ${START_DIR}/clone - git ls-remote --tags origin 2>&1 | awk -F 'refs/tags/' '{print $2}' | sort -V | grep -E '\d{4}\.\d\.\d$' | tail -n 1 -)" - # Clean out the old data if it exists. if [[ -d custom_components ]]; then rm -rf custom_components From d97d1c7b6e9058cb38e63738ee80ca9b7752a92f Mon Sep 17 00:00:00 2001 From: richard-scott Date: Sat, 29 Jul 2023 18:40:10 +0000 Subject: [PATCH 59/87] Apply automatic changes --- custom_components/default_config/__init__.py | 18 +++++++ .../default_config/manifest.json | 52 +++++++++++++++++++ hacs.json | 6 ++- 3 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 custom_components/default_config/__init__.py create mode 100644 custom_components/default_config/manifest.json diff --git a/custom_components/default_config/__init__.py b/custom_components/default_config/__init__.py new file mode 100644 index 0000000..25a9ca3 --- /dev/null +++ b/custom_components/default_config/__init__.py @@ -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 diff --git a/custom_components/default_config/manifest.json b/custom_components/default_config/manifest.json new file mode 100644 index 0000000..419952c --- /dev/null +++ b/custom_components/default_config/manifest.json @@ -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.7.3.1" +} diff --git a/hacs.json b/hacs.json index 4b6e72f..8fa49d3 100644 --- a/hacs.json +++ b/hacs.json @@ -1 +1,5 @@ -{ "name": "Home Assistant Cloud Hider", "render_readme": true, "homeassistant": "2023.7.3" } +{ + "name": "Home Assistant Cloud Hider", + "render_readme": true, + "homeassistant": "2023.7.3" +} From ed5e44f550656fb550ad626d94e1a280aa9ab83b Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Tue, 1 Aug 2023 09:28:44 +0100 Subject: [PATCH 60/87] Updated release tag detection code --- .github/workflows/default_config.yaml | 12 ++---------- bin/update.sh | 1 + 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/default_config.yaml b/.github/workflows/default_config.yaml index ef8d7db..352cbca 100644 --- a/.github/workflows/default_config.yaml +++ b/.github/workflows/default_config.yaml @@ -45,14 +45,6 @@ jobs: # - name: Home Assistant 'hassfest' Action # uses: "home-assistant/actions/hassfest@master" - - uses: cardinalby/git-get-release-action@v1 - env: - GITHUB_TOKEN: ${{ github.token }} - with: - repo: home-assistant/core - releaseNameRegEx: '^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)' - id: latest_tag - - uses: stefanzweifel/git-auto-commit-action@v4 with: repository: clone @@ -63,5 +55,5 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token with: skipIfReleaseExists: true - tag: "${{ steps.latest_tag.outputs.name }}" - name: "Release ${{ steps.latest_tag.outputs.name }}" + tag: "${{ env.latest_tag }}" + name: "Release ${{ env.latest_tag }}" diff --git a/bin/update.sh b/bin/update.sh index b06e04a..7c35f95 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -9,6 +9,7 @@ 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)" +echo "{latest_tag}=${HOME_ASSISTANT_CORE_LATEST_TAG}" >>"$GITHUB_ENV" # If we haven't already checked out the repo, do so now. if [[ ! -d core ]]; then From 8810b6a260ce33271503f9d0e1c258668454ffa3 Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Tue, 1 Aug 2023 09:35:04 +0100 Subject: [PATCH 61/87] Updated release tag detection code --- bin/update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/update.sh b/bin/update.sh index 7c35f95..162ce6e 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -9,7 +9,7 @@ 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)" -echo "{latest_tag}=${HOME_ASSISTANT_CORE_LATEST_TAG}" >>"$GITHUB_ENV" +echo "latest_tag=${HOME_ASSISTANT_CORE_LATEST_TAG}" >>"$GITHUB_ENV" # If we haven't already checked out the repo, do so now. if [[ ! -d core ]]; then From 93c24e95231e8bda753ffe269fe03c95838606d2 Mon Sep 17 00:00:00 2001 From: richard-scott Date: Thu, 3 Aug 2023 00:55:47 +0000 Subject: [PATCH 62/87] Apply automatic changes --- custom_components/default_config/manifest.json | 2 +- hacs.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/default_config/manifest.json b/custom_components/default_config/manifest.json index 419952c..4131c86 100644 --- a/custom_components/default_config/manifest.json +++ b/custom_components/default_config/manifest.json @@ -48,5 +48,5 @@ "documentation": "https://www.home-assistant.io/integrations/default_config", "integration_type": "system", "quality_scale": "internal", - "version": "2023.7.3.1" + "version": "2023.8.0.1" } diff --git a/hacs.json b/hacs.json index 8fa49d3..5261468 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,5 @@ { "name": "Home Assistant Cloud Hider", "render_readme": true, - "homeassistant": "2023.7.3" + "homeassistant": "2023.8.0" } From ee5094aa2d3b79417ec7ee54cc29f259183ed5fd Mon Sep 17 00:00:00 2001 From: richard-scott Date: Sat, 5 Aug 2023 00:52:37 +0000 Subject: [PATCH 63/87] Apply automatic changes --- custom_components/default_config/manifest.json | 2 +- hacs.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/default_config/manifest.json b/custom_components/default_config/manifest.json index 4131c86..8b1fb57 100644 --- a/custom_components/default_config/manifest.json +++ b/custom_components/default_config/manifest.json @@ -48,5 +48,5 @@ "documentation": "https://www.home-assistant.io/integrations/default_config", "integration_type": "system", "quality_scale": "internal", - "version": "2023.8.0.1" + "version": "2023.8.1.1" } diff --git a/hacs.json b/hacs.json index 5261468..168a705 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,5 @@ { "name": "Home Assistant Cloud Hider", "render_readme": true, - "homeassistant": "2023.8.0" + "homeassistant": "2023.8.1" } From 86e331a539e8b190b2cb5cdbc4561a8fd74d20ab Mon Sep 17 00:00:00 2001 From: richard-scott Date: Sat, 12 Aug 2023 00:42:40 +0000 Subject: [PATCH 64/87] Apply automatic changes --- custom_components/default_config/manifest.json | 2 +- hacs.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/default_config/manifest.json b/custom_components/default_config/manifest.json index 8b1fb57..13f76d2 100644 --- a/custom_components/default_config/manifest.json +++ b/custom_components/default_config/manifest.json @@ -48,5 +48,5 @@ "documentation": "https://www.home-assistant.io/integrations/default_config", "integration_type": "system", "quality_scale": "internal", - "version": "2023.8.1.1" + "version": "2023.8.2.1" } diff --git a/hacs.json b/hacs.json index 168a705..4412627 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,5 @@ { "name": "Home Assistant Cloud Hider", "render_readme": true, - "homeassistant": "2023.8.1" + "homeassistant": "2023.8.2" } From d5f8a2bb8d87917db14e3ea3d6cda58ad4e57aea Mon Sep 17 00:00:00 2001 From: richard-scott Date: Sat, 19 Aug 2023 00:42:09 +0000 Subject: [PATCH 65/87] Apply automatic changes --- custom_components/default_config/manifest.json | 2 +- hacs.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/default_config/manifest.json b/custom_components/default_config/manifest.json index 13f76d2..effba2c 100644 --- a/custom_components/default_config/manifest.json +++ b/custom_components/default_config/manifest.json @@ -48,5 +48,5 @@ "documentation": "https://www.home-assistant.io/integrations/default_config", "integration_type": "system", "quality_scale": "internal", - "version": "2023.8.2.1" + "version": "2023.8.3.1" } diff --git a/hacs.json b/hacs.json index 4412627..08cb784 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,5 @@ { "name": "Home Assistant Cloud Hider", "render_readme": true, - "homeassistant": "2023.8.2" + "homeassistant": "2023.8.3" } From 76ae5126fd3c321921f14bb839ba2422a140e66a Mon Sep 17 00:00:00 2001 From: richard-scott Date: Fri, 25 Aug 2023 00:44:55 +0000 Subject: [PATCH 66/87] Apply automatic changes --- custom_components/default_config/manifest.json | 2 +- hacs.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/default_config/manifest.json b/custom_components/default_config/manifest.json index effba2c..da5c325 100644 --- a/custom_components/default_config/manifest.json +++ b/custom_components/default_config/manifest.json @@ -48,5 +48,5 @@ "documentation": "https://www.home-assistant.io/integrations/default_config", "integration_type": "system", "quality_scale": "internal", - "version": "2023.8.3.1" + "version": "2023.8.4.1" } diff --git a/hacs.json b/hacs.json index 08cb784..688cf37 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,5 @@ { "name": "Home Assistant Cloud Hider", "render_readme": true, - "homeassistant": "2023.8.3" + "homeassistant": "2023.8.4" } From 7bcdd5ef45dc33d6c7055a068b5e590d8d3b15b0 Mon Sep 17 00:00:00 2001 From: richard-scott Date: Thu, 7 Sep 2023 00:44:35 +0000 Subject: [PATCH 67/87] Apply automatic changes --- custom_components/default_config/manifest.json | 2 +- hacs.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/default_config/manifest.json b/custom_components/default_config/manifest.json index da5c325..2ddbb35 100644 --- a/custom_components/default_config/manifest.json +++ b/custom_components/default_config/manifest.json @@ -48,5 +48,5 @@ "documentation": "https://www.home-assistant.io/integrations/default_config", "integration_type": "system", "quality_scale": "internal", - "version": "2023.8.4.1" + "version": "2023.9.0.1" } diff --git a/hacs.json b/hacs.json index 688cf37..7212612 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,5 @@ { "name": "Home Assistant Cloud Hider", "render_readme": true, - "homeassistant": "2023.8.4" + "homeassistant": "2023.9.0" } From bab781221f9c93cec0297c42c1c7ea2fbfce854b Mon Sep 17 00:00:00 2001 From: richard-scott Date: Sat, 9 Sep 2023 00:43:37 +0000 Subject: [PATCH 68/87] Apply automatic changes --- custom_components/default_config/manifest.json | 2 +- hacs.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/default_config/manifest.json b/custom_components/default_config/manifest.json index 2ddbb35..ed2a577 100644 --- a/custom_components/default_config/manifest.json +++ b/custom_components/default_config/manifest.json @@ -48,5 +48,5 @@ "documentation": "https://www.home-assistant.io/integrations/default_config", "integration_type": "system", "quality_scale": "internal", - "version": "2023.9.0.1" + "version": "2023.9.1.1" } diff --git a/hacs.json b/hacs.json index 7212612..f194450 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,5 @@ { "name": "Home Assistant Cloud Hider", "render_readme": true, - "homeassistant": "2023.9.0" + "homeassistant": "2023.9.1" } From 34d3e15f9fadeee1cae40ee624421a0fce032178 Mon Sep 17 00:00:00 2001 From: richard-scott Date: Wed, 13 Sep 2023 00:45:50 +0000 Subject: [PATCH 69/87] Apply automatic changes --- custom_components/default_config/manifest.json | 2 +- hacs.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/default_config/manifest.json b/custom_components/default_config/manifest.json index ed2a577..c7db135 100644 --- a/custom_components/default_config/manifest.json +++ b/custom_components/default_config/manifest.json @@ -48,5 +48,5 @@ "documentation": "https://www.home-assistant.io/integrations/default_config", "integration_type": "system", "quality_scale": "internal", - "version": "2023.9.1.1" + "version": "2023.9.2.1" } diff --git a/hacs.json b/hacs.json index f194450..11fe867 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,5 @@ { "name": "Home Assistant Cloud Hider", "render_readme": true, - "homeassistant": "2023.9.1" + "homeassistant": "2023.9.2" } From 5c1934f324719198c520a905403b073344acfa05 Mon Sep 17 00:00:00 2001 From: richard-scott Date: Mon, 25 Sep 2023 00:46:31 +0000 Subject: [PATCH 70/87] Apply automatic changes --- custom_components/default_config/manifest.json | 2 +- hacs.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/default_config/manifest.json b/custom_components/default_config/manifest.json index c7db135..ece0cbc 100644 --- a/custom_components/default_config/manifest.json +++ b/custom_components/default_config/manifest.json @@ -48,5 +48,5 @@ "documentation": "https://www.home-assistant.io/integrations/default_config", "integration_type": "system", "quality_scale": "internal", - "version": "2023.9.2.1" + "version": "2023.9.3.1" } diff --git a/hacs.json b/hacs.json index 11fe867..5941146 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,5 @@ { "name": "Home Assistant Cloud Hider", "render_readme": true, - "homeassistant": "2023.9.2" + "homeassistant": "2023.9.3" } From 20f2ed01560f1a2ead2cbabb525dfababccaf4ae Mon Sep 17 00:00:00 2001 From: richard-scott Date: Thu, 5 Oct 2023 00:46:50 +0000 Subject: [PATCH 71/87] Apply automatic changes --- custom_components/default_config/manifest.json | 2 +- hacs.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/default_config/manifest.json b/custom_components/default_config/manifest.json index ece0cbc..b58a468 100644 --- a/custom_components/default_config/manifest.json +++ b/custom_components/default_config/manifest.json @@ -48,5 +48,5 @@ "documentation": "https://www.home-assistant.io/integrations/default_config", "integration_type": "system", "quality_scale": "internal", - "version": "2023.9.3.1" + "version": "2023.10.0.1" } diff --git a/hacs.json b/hacs.json index 5941146..80d7958 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,5 @@ { "name": "Home Assistant Cloud Hider", "render_readme": true, - "homeassistant": "2023.9.3" + "homeassistant": "2023.10.0" } From 510bc122fd3f097a2b7684a749d806d659bcbaf6 Mon Sep 17 00:00:00 2001 From: richard-scott Date: Sat, 7 Oct 2023 00:45:28 +0000 Subject: [PATCH 72/87] Apply automatic changes --- custom_components/default_config/manifest.json | 2 +- hacs.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/default_config/manifest.json b/custom_components/default_config/manifest.json index b58a468..2641574 100644 --- a/custom_components/default_config/manifest.json +++ b/custom_components/default_config/manifest.json @@ -48,5 +48,5 @@ "documentation": "https://www.home-assistant.io/integrations/default_config", "integration_type": "system", "quality_scale": "internal", - "version": "2023.10.0.1" + "version": "2023.10.1.1" } diff --git a/hacs.json b/hacs.json index 80d7958..22d37c4 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,5 @@ { "name": "Home Assistant Cloud Hider", "render_readme": true, - "homeassistant": "2023.10.0" + "homeassistant": "2023.10.1" } From 435ddff5437c482bb7379286dfda12113b7e5a9a Mon Sep 17 00:00:00 2001 From: richard-scott Date: Fri, 13 Oct 2023 00:48:11 +0000 Subject: [PATCH 73/87] Apply automatic changes --- custom_components/default_config/manifest.json | 2 +- hacs.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/default_config/manifest.json b/custom_components/default_config/manifest.json index 2641574..0f90c52 100644 --- a/custom_components/default_config/manifest.json +++ b/custom_components/default_config/manifest.json @@ -48,5 +48,5 @@ "documentation": "https://www.home-assistant.io/integrations/default_config", "integration_type": "system", "quality_scale": "internal", - "version": "2023.10.1.1" + "version": "2023.10.2.1" } diff --git a/hacs.json b/hacs.json index 22d37c4..5ded2fd 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,5 @@ { "name": "Home Assistant Cloud Hider", "render_readme": true, - "homeassistant": "2023.10.1" + "homeassistant": "2023.10.2" } From 46fd1e3a91571955a7d24ea7db95384010adc286 Mon Sep 17 00:00:00 2001 From: richard-scott Date: Sat, 14 Oct 2023 00:44:43 +0000 Subject: [PATCH 74/87] Apply automatic changes --- custom_components/default_config/manifest.json | 2 +- hacs.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/default_config/manifest.json b/custom_components/default_config/manifest.json index 0f90c52..d30721b 100644 --- a/custom_components/default_config/manifest.json +++ b/custom_components/default_config/manifest.json @@ -48,5 +48,5 @@ "documentation": "https://www.home-assistant.io/integrations/default_config", "integration_type": "system", "quality_scale": "internal", - "version": "2023.10.2.1" + "version": "2023.10.3.1" } diff --git a/hacs.json b/hacs.json index 5ded2fd..614957f 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,5 @@ { "name": "Home Assistant Cloud Hider", "render_readme": true, - "homeassistant": "2023.10.2" + "homeassistant": "2023.10.3" } From d9e15bbd0aed3f41f1d3c0ba25688692cbee73ed Mon Sep 17 00:00:00 2001 From: richard-scott Date: Sun, 22 Oct 2023 00:50:46 +0000 Subject: [PATCH 75/87] Apply automatic changes --- custom_components/default_config/manifest.json | 2 +- hacs.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/default_config/manifest.json b/custom_components/default_config/manifest.json index d30721b..0c81905 100644 --- a/custom_components/default_config/manifest.json +++ b/custom_components/default_config/manifest.json @@ -48,5 +48,5 @@ "documentation": "https://www.home-assistant.io/integrations/default_config", "integration_type": "system", "quality_scale": "internal", - "version": "2023.10.3.1" + "version": "2023.10.4.1" } diff --git a/hacs.json b/hacs.json index 614957f..fae634e 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,5 @@ { "name": "Home Assistant Cloud Hider", "render_readme": true, - "homeassistant": "2023.10.3" + "homeassistant": "2023.10.4" } From fb02eea00a8a39942922e8e8873454791e628e55 Mon Sep 17 00:00:00 2001 From: richard-scott Date: Mon, 23 Oct 2023 00:47:16 +0000 Subject: [PATCH 76/87] Apply automatic changes --- custom_components/default_config/manifest.json | 2 +- hacs.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/default_config/manifest.json b/custom_components/default_config/manifest.json index 0c81905..9111ced 100644 --- a/custom_components/default_config/manifest.json +++ b/custom_components/default_config/manifest.json @@ -48,5 +48,5 @@ "documentation": "https://www.home-assistant.io/integrations/default_config", "integration_type": "system", "quality_scale": "internal", - "version": "2023.10.4.1" + "version": "2023.10.5.1" } diff --git a/hacs.json b/hacs.json index fae634e..495c799 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,5 @@ { "name": "Home Assistant Cloud Hider", "render_readme": true, - "homeassistant": "2023.10.4" + "homeassistant": "2023.10.5" } From 9177373beefa4281e7a8c460c6f24316ead88fa7 Mon Sep 17 00:00:00 2001 From: richard-scott Date: Thu, 2 Nov 2023 00:46:31 +0000 Subject: [PATCH 77/87] Apply automatic changes --- custom_components/default_config/manifest.json | 2 +- hacs.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/default_config/manifest.json b/custom_components/default_config/manifest.json index 9111ced..750ed3c 100644 --- a/custom_components/default_config/manifest.json +++ b/custom_components/default_config/manifest.json @@ -48,5 +48,5 @@ "documentation": "https://www.home-assistant.io/integrations/default_config", "integration_type": "system", "quality_scale": "internal", - "version": "2023.10.5.1" + "version": "2023.11.0.1" } diff --git a/hacs.json b/hacs.json index 495c799..3257e53 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,5 @@ { "name": "Home Assistant Cloud Hider", "render_readme": true, - "homeassistant": "2023.10.5" + "homeassistant": "2023.11.0" } From e4130634e56fbd21bd302c9b100dc7c72a9dfeeb Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Thu, 2 Nov 2023 12:02:18 +0000 Subject: [PATCH 78/87] A fix for Issue #1 --- .github/workflows/default_config.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/default_config.yaml b/.github/workflows/default_config.yaml index 352cbca..a297b9e 100644 --- a/.github/workflows/default_config.yaml +++ b/.github/workflows/default_config.yaml @@ -46,10 +46,12 @@ jobs: # 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/release-action@v1.12.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token From bcac7668df88f84b40ce3a1fef0d2a3e51aa5caa Mon Sep 17 00:00:00 2001 From: richard-scott Date: Sun, 5 Nov 2023 00:51:17 +0000 Subject: [PATCH 79/87] Apply automatic changes --- custom_components/default_config/manifest.json | 2 +- hacs.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/default_config/manifest.json b/custom_components/default_config/manifest.json index 750ed3c..d08d011 100644 --- a/custom_components/default_config/manifest.json +++ b/custom_components/default_config/manifest.json @@ -48,5 +48,5 @@ "documentation": "https://www.home-assistant.io/integrations/default_config", "integration_type": "system", "quality_scale": "internal", - "version": "2023.11.0.1" + "version": "2023.11.1.1" } diff --git a/hacs.json b/hacs.json index 3257e53..e0026e0 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,5 @@ { "name": "Home Assistant Cloud Hider", "render_readme": true, - "homeassistant": "2023.11.0" + "homeassistant": "2023.11.1" } From 5143d7054eee02d91ec151d6a260171204b98b1c Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Mon, 6 Nov 2023 08:57:14 +0000 Subject: [PATCH 80/87] Updated script to only rsync new changes. --- bin/update.sh | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/bin/update.sh b/bin/update.sh index 162ce6e..9605f56 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -15,7 +15,7 @@ echo "latest_tag=${HOME_ASSISTANT_CORE_LATEST_TAG}" >>"$GITHUB_ENV" if [[ ! -d core ]]; then # Clone the repo max-depth of 1 commit as we only need the latest. - git clone https://github.com/home-assistant/core/ + git clone --depth 1 https://github.com/home-assistant/core/ # Ensure that the core directory gets cleaned up on exit. trap "rm -rf "${START_DIR}/core"" EXIT @@ -28,22 +28,28 @@ SRC_DIR="${START_DIR}/core/homeassistant/components/default_config" # Check the source directory exists test -d "${SRC_DIR}" || exit 1 -# Clean out the old data if it exists. -if [[ -d custom_components ]]; then - rm -rf custom_components -fi +# # Clean out the old data if it exists. +# if [[ -d custom_components ]]; then +# rm -rf custom_components +# fi # Create somewhere for our updated code to go. -mkdir -p custom_components/default_config +if [[ ! -d custom_components/default_config ]]; then + mkdir -p custom_components/default_config +fi # Copy over the upstream files -cp -Rpf "${START_DIR}/core/homeassistant/components/default_config" "${START_DIR}/custom_components" +if rsync -avz "${START_DIR}/core/homeassistant/components/default_config" "${START_DIR}/custom_components" --dry-run | grep -q default_config; then + + rsync -avz "${START_DIR}/core/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 + # 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 + # 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 + # 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 From 87eba2ae9c2c808c546e8010f91a1503598fab07 Mon Sep 17 00:00:00 2001 From: richard-scott Date: Sat, 11 Nov 2023 00:46:23 +0000 Subject: [PATCH 81/87] Apply automatic changes --- custom_components/default_config/manifest.json | 2 +- hacs.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/default_config/manifest.json b/custom_components/default_config/manifest.json index d08d011..6396ee8 100644 --- a/custom_components/default_config/manifest.json +++ b/custom_components/default_config/manifest.json @@ -48,5 +48,5 @@ "documentation": "https://www.home-assistant.io/integrations/default_config", "integration_type": "system", "quality_scale": "internal", - "version": "2023.11.1.1" + "version": "2023.11.2.1" } diff --git a/hacs.json b/hacs.json index e0026e0..85409b3 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,5 @@ { "name": "Home Assistant Cloud Hider", "render_readme": true, - "homeassistant": "2023.11.1" + "homeassistant": "2023.11.2" } From 2e42e9f2ffb247bb5da61a4a8ef4272742406e56 Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Sat, 11 Nov 2023 09:28:30 +0000 Subject: [PATCH 82/87] Reverted changes --- bin/update.sh | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/bin/update.sh b/bin/update.sh index 9605f56..c58d45b 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -28,28 +28,19 @@ SRC_DIR="${START_DIR}/core/homeassistant/components/default_config" # Check the source directory exists test -d "${SRC_DIR}" || exit 1 -# # Clean out the old data if it exists. -# if [[ -d custom_components ]]; then -# rm -rf custom_components -# fi - # Create somewhere for our updated code to go. if [[ ! -d custom_components/default_config ]]; then mkdir -p custom_components/default_config fi # Copy over the upstream files -if rsync -avz "${START_DIR}/core/homeassistant/components/default_config" "${START_DIR}/custom_components" --dry-run | grep -q default_config; then - - rsync -avz "${START_DIR}/core/homeassistant/components/default_config" "${START_DIR}/custom_components" +rsync -avz "${START_DIR}/core/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 +# 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 +# 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 +# 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 From 8beb5e4d0ad32e1d450b2e83cefe7df688c72a0d Mon Sep 17 00:00:00 2001 From: richard-scott Date: Thu, 23 Nov 2023 00:48:57 +0000 Subject: [PATCH 83/87] Apply automatic changes --- custom_components/default_config/manifest.json | 2 +- hacs.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/default_config/manifest.json b/custom_components/default_config/manifest.json index 6396ee8..148abb9 100644 --- a/custom_components/default_config/manifest.json +++ b/custom_components/default_config/manifest.json @@ -48,5 +48,5 @@ "documentation": "https://www.home-assistant.io/integrations/default_config", "integration_type": "system", "quality_scale": "internal", - "version": "2023.11.2.1" + "version": "2023.11.3.1" } diff --git a/hacs.json b/hacs.json index 85409b3..bba197b 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,5 @@ { "name": "Home Assistant Cloud Hider", "render_readme": true, - "homeassistant": "2023.11.2" + "homeassistant": "2023.11.3" } From b64d1592f9f63859d7be1681eaad8844cc088c56 Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Thu, 23 Nov 2023 13:37:02 +0000 Subject: [PATCH 84/87] Added checks for upstream changes --- .github/workflows/default_config.yaml | 3 ++- .gitignore | 2 +- .gitmodules | 3 +++ bin/update.sh | 37 ++++++++++++++++++--------- core | 1 + 5 files changed, 32 insertions(+), 14 deletions(-) create mode 100644 .gitmodules create mode 160000 core diff --git a/.github/workflows/default_config.yaml b/.github/workflows/default_config.yaml index a297b9e..3412962 100644 --- a/.github/workflows/default_config.yaml +++ b/.github/workflows/default_config.yaml @@ -26,12 +26,13 @@ jobs: with: ref: ${{ github.head_ref }} path: "clone" + submodules: "recursive" - name: "Checkout Git https://github.com/home-assistant/core/" uses: actions/checkout@v3 with: repository: "home-assistant/core" - path: "core" + path: "upstream" - name: Update files via script shell: bash diff --git a/.gitignore b/.gitignore index 7a6d072..9878844 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ .history cloud.code-workspace -core +upstream diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..ba2eff7 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "core"] + path = core + url = https://github.com/home-assistant/core diff --git a/bin/update.sh b/bin/update.sh index c58d45b..20ac58b 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -9,17 +9,25 @@ 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)" -echo "latest_tag=${HOME_ASSISTANT_CORE_LATEST_TAG}" >>"$GITHUB_ENV" +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 core ]]; then +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/ + 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}/core"" EXIT + trap "rm -rf "${START_DIR}/upstream"" EXIT + +fi +if [[ -d core ]]; then + cd core + git pull --depth 1 + cd "${START_DIR}" fi # Create a variable for the source directory we are using. @@ -33,14 +41,19 @@ if [[ ! -d custom_components/default_config ]]; then mkdir -p custom_components/default_config fi -# Copy over the upstream files -rsync -avz "${START_DIR}/core/homeassistant/components/default_config" "${START_DIR}/custom_components" +# Check for changed files +if [[ $(rsync -avz --checksum --dry-run ${START_DIR}/upstream/homeassistant/components/default_config ${START_DIR}/core/homeassistant/components | grep -c default_config) -gt 1 ]]; then -# 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 + # Copy over the upstream files + rsync -avz "${START_DIR}/core/homeassistant/components/default_config" "${START_DIR}/custom_components" -# 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 + # 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 -# 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 + # 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 diff --git a/core b/core new file mode 160000 index 0000000..a1f7f89 --- /dev/null +++ b/core @@ -0,0 +1 @@ +Subproject commit a1f7f899c94f3b02baeaeb34bae1c7315338d20c From 02d4ef89074305389938fb6e8b4f6975dea30dcf Mon Sep 17 00:00:00 2001 From: Richard Scott Date: Tue, 5 Dec 2023 16:53:04 +0000 Subject: [PATCH 85/87] Reverted code changes --- .github/workflows/default_config.yaml | 1 - bin/update.sh | 12 ++--- core | 1 - .../default_config/manifest.json | 53 +------------------ hacs.json | 6 +-- 5 files changed, 5 insertions(+), 68 deletions(-) delete mode 160000 core diff --git a/.github/workflows/default_config.yaml b/.github/workflows/default_config.yaml index 3412962..1cbe9d3 100644 --- a/.github/workflows/default_config.yaml +++ b/.github/workflows/default_config.yaml @@ -26,7 +26,6 @@ jobs: with: ref: ${{ github.head_ref }} path: "clone" - submodules: "recursive" - name: "Checkout Git https://github.com/home-assistant/core/" uses: actions/checkout@v3 diff --git a/bin/update.sh b/bin/update.sh index 20ac58b..a8f6377 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -24,14 +24,8 @@ if [[ ! -d upstream ]]; then fi -if [[ -d core ]]; then - cd core - git pull --depth 1 - cd "${START_DIR}" -fi - # Create a variable for the source directory we are using. -SRC_DIR="${START_DIR}/core/homeassistant/components/default_config" +SRC_DIR="${START_DIR}/upstream/homeassistant/components/default_config" # Check the source directory exists test -d "${SRC_DIR}" || exit 1 @@ -42,10 +36,10 @@ if [[ ! -d custom_components/default_config ]]; then fi # Check for changed files -if [[ $(rsync -avz --checksum --dry-run ${START_DIR}/upstream/homeassistant/components/default_config ${START_DIR}/core/homeassistant/components | grep -c default_config) -gt 1 ]]; then +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}/core/homeassistant/components/default_config" "${START_DIR}/custom_components" + 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 diff --git a/core b/core deleted file mode 160000 index a1f7f89..0000000 --- a/core +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a1f7f899c94f3b02baeaeb34bae1c7315338d20c diff --git a/custom_components/default_config/manifest.json b/custom_components/default_config/manifest.json index 148abb9..929ab8c 100644 --- a/custom_components/default_config/manifest.json +++ b/custom_components/default_config/manifest.json @@ -1,52 +1 @@ -{ - "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.11.3.1" -} +{ "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.11.3.1" } diff --git a/hacs.json b/hacs.json index bba197b..f337952 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1 @@ -{ - "name": "Home Assistant Cloud Hider", - "render_readme": true, - "homeassistant": "2023.11.3" -} +{ "name": "Home Assistant Cloud Hider", "render_readme": true, "homeassistant": "2023.11.3" } From 1cdb69b180f872e686e90d71deb8e5d29fe94f1e Mon Sep 17 00:00:00 2001 From: richard-scott Date: Tue, 5 Dec 2023 16:53:33 +0000 Subject: [PATCH 86/87] Apply automatic changes --- .../default_config/manifest.json | 53 ++++++++++++++++++- hacs.json | 6 ++- 2 files changed, 57 insertions(+), 2 deletions(-) diff --git a/custom_components/default_config/manifest.json b/custom_components/default_config/manifest.json index 929ab8c..148abb9 100644 --- a/custom_components/default_config/manifest.json +++ b/custom_components/default_config/manifest.json @@ -1 +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.11.3.1" } +{ + "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.11.3.1" +} diff --git a/hacs.json b/hacs.json index f337952..bba197b 100644 --- a/hacs.json +++ b/hacs.json @@ -1 +1,5 @@ -{ "name": "Home Assistant Cloud Hider", "render_readme": true, "homeassistant": "2023.11.3" } +{ + "name": "Home Assistant Cloud Hider", + "render_readme": true, + "homeassistant": "2023.11.3" +} From 2e57252c3e10b8b0c9cc36a3290290d1ba575d79 Mon Sep 17 00:00:00 2001 From: richard-scott Date: Wed, 6 Dec 2023 20:57:04 +0000 Subject: [PATCH 87/87] Apply automatic changes --- custom_components/default_config/manifest.json | 2 +- hacs.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/default_config/manifest.json b/custom_components/default_config/manifest.json index 148abb9..e117b9f 100644 --- a/custom_components/default_config/manifest.json +++ b/custom_components/default_config/manifest.json @@ -48,5 +48,5 @@ "documentation": "https://www.home-assistant.io/integrations/default_config", "integration_type": "system", "quality_scale": "internal", - "version": "2023.11.3.1" + "version": "2023.12.0.1" } diff --git a/hacs.json b/hacs.json index bba197b..52c460a 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,5 @@ { "name": "Home Assistant Cloud Hider", "render_readme": true, - "homeassistant": "2023.11.3" + "homeassistant": "2023.12.0" }