From a3869efaa3864eb42a9adb435c197026662df597 Mon Sep 17 00:00:00 2001 From: MattMorgan <48740594+spycle@users.noreply.github.com> Date: Sun, 29 Jun 2025 13:28:21 +0100 Subject: [PATCH 01/11] Update __init__.py --- custom_components/tuneblade/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/custom_components/tuneblade/__init__.py b/custom_components/tuneblade/__init__.py index b6b35f4..72b4711 100644 --- a/custom_components/tuneblade/__init__.py +++ b/custom_components/tuneblade/__init__.py @@ -68,8 +68,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry): for platform in PLATFORMS: if entry.options.get(platform, True): coordinator.platforms.append(platform) - hass.async_add_job( - hass.config_entries.async_forward_entry_setup(entry, platform) + hass.async_create_background_task( + hass.config_entries.async_forward_entry_setups(entry, [platform]), + name=f"tuneblade: forward {platform}" ) entry.add_update_listener(async_reload_entry) From d6f7e6f21ae031d507faa22b59eaf38ff79f85c4 Mon Sep 17 00:00:00 2001 From: MattMorgan <48740594+spycle@users.noreply.github.com> Date: Sun, 29 Jun 2025 13:28:42 +0100 Subject: [PATCH 02/11] Update media_player.py --- custom_components/tuneblade/media_player.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/custom_components/tuneblade/media_player.py b/custom_components/tuneblade/media_player.py index 28111db..f160cd9 100644 --- a/custom_components/tuneblade/media_player.py +++ b/custom_components/tuneblade/media_player.py @@ -1,5 +1,6 @@ """Media Player platform for TuneBlade.""" from homeassistant.components.media_player import MediaPlayerEntity +from homeassistant.components.media_player import MediaPlayerEntityFeature from homeassistant.components.media_player.const import ( SUPPORT_VOLUME_SET, SUPPORT_TURN_ON, @@ -14,12 +15,12 @@ from .entity import TuneBladeEntity SUPPORTED_FEATURES = ( - SUPPORT_VOLUME_SET - | SUPPORT_TURN_ON - | SUPPORT_TURN_OFF + MediaPlayerEntityFeature.VOLUME_SET + | MediaPlayerEntityFeature.TURN_ON + | MediaPlayerEntityFeature.TURN_OFF ) -SUPPORTED_FEATURES_MASTER = (SUPPORT_VOLUME_SET) +SUPPORTED_FEATURES_MASTER = MediaPlayerEntityFeature.SUPPORT_VOLUME_SET async def async_setup_entry(hass, entry, async_add_devices): """Setup sensor platform.""" From 29f08455c9ca205eeaf6bed69ff1515392b886b1 Mon Sep 17 00:00:00 2001 From: MattMorgan <48740594+spycle@users.noreply.github.com> Date: Sun, 29 Jun 2025 13:34:06 +0100 Subject: [PATCH 03/11] Update hacs.json --- hacs.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hacs.json b/hacs.json index bdbe86b..1e6bea2 100644 --- a/hacs.json +++ b/hacs.json @@ -1,9 +1,6 @@ { "name": "TuneBlade", "content_in_root": false, - "domains": [ - "media_player", - "switch" - ], + "domain": "media_player", "render_readme": true } From 459bce947bcc31c0ca78643e70153746a117798a Mon Sep 17 00:00:00 2001 From: MattMorgan <48740594+spycle@users.noreply.github.com> Date: Sun, 29 Jun 2025 13:38:47 +0100 Subject: [PATCH 04/11] Update hacs.json --- hacs.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hacs.json b/hacs.json index 1e6bea2..6500950 100644 --- a/hacs.json +++ b/hacs.json @@ -1,6 +1,6 @@ { "name": "TuneBlade", "content_in_root": false, - "domain": "media_player", + "domains": "media_player", "render_readme": true } From 164b1fbeda5e1a6afb9f6fc940705aabf52d86b2 Mon Sep 17 00:00:00 2001 From: MattMorgan <48740594+spycle@users.noreply.github.com> Date: Sun, 29 Jun 2025 13:45:39 +0100 Subject: [PATCH 05/11] Update pull.yml --- .github/workflows/pull.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pull.yml b/.github/workflows/pull.yml index d895c86..b55dbce 100644 --- a/.github/workflows/pull.yml +++ b/.github/workflows/pull.yml @@ -24,7 +24,7 @@ jobs: name: Check style formatting steps: - uses: "actions/checkout@v2" - - uses: "actions/setup-python@v1" + - uses: "actions/setup-python@v4" with: python-version: "3.x" - run: python3 -m pip install black @@ -37,9 +37,9 @@ jobs: - name: Check out code from GitHub uses: "actions/checkout@v2" - name: Setup Python - uses: "actions/setup-python@v1" + uses: "actions/setup-python@v4" with: - python-version: "3.8" + python-version: "3.10" - name: Install requirements run: python3 -m pip install -r requirements_test.txt - name: Run tests From 58d4daceb607cd1d2b917b113cf806975ca16a27 Mon Sep 17 00:00:00 2001 From: MattMorgan <48740594+spycle@users.noreply.github.com> Date: Sun, 29 Jun 2025 13:50:07 +0100 Subject: [PATCH 06/11] Update pull.yml --- .github/workflows/pull.yml | 58 ++++++++++++-------------------------- 1 file changed, 18 insertions(+), 40 deletions(-) diff --git a/.github/workflows/pull.yml b/.github/workflows/pull.yml index b55dbce..bd9b53b 100644 --- a/.github/workflows/pull.yml +++ b/.github/workflows/pull.yml @@ -5,51 +5,29 @@ on: jobs: validate: - runs-on: "ubuntu-latest" - name: Validate + runs-on: ubuntu-latest steps: - - uses: "actions/checkout@v2" + - uses: actions/checkout@v4 - - name: HACS validation - uses: "hacs/action@main" - with: - category: "integration" - ignore: brands + - name: HACS validation + uses: hacs/action@main + with: + category: integration + ignore: brands - - name: Hassfest validation - uses: "home-assistant/actions/hassfest@master" + - name: Hassfest validation + uses: home-assistant/actions/hassfest@master style: - runs-on: "ubuntu-latest" - name: Check style formatting - steps: - - uses: "actions/checkout@v2" - - uses: "actions/setup-python@v4" - with: - python-version: "3.x" - - run: python3 -m pip install black - - run: black . - - tests: - runs-on: "ubuntu-latest" - name: Run tests + runs-on: ubuntu-latest steps: - - name: Check out code from GitHub - uses: "actions/checkout@v2" - - name: Setup Python - uses: "actions/setup-python@v4" + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 with: python-version: "3.10" - - name: Install requirements - run: python3 -m pip install -r requirements_test.txt - - name: Run tests - run: | - pytest \ - -qq \ - --timeout=9 \ - --durations=10 \ - -n auto \ - --cov custom_components.integration_blueprint \ - -o console_output_style=count \ - -p no:sugar \ - tests + + - name: Install Black + run: python3 -m pip install black + + - name: Run Black + run: black --check . From bd4cb3474fa9054df2cd5d0463cde6ea54c4fd72 Mon Sep 17 00:00:00 2001 From: MattMorgan <48740594+spycle@users.noreply.github.com> Date: Sun, 29 Jun 2025 13:52:25 +0100 Subject: [PATCH 07/11] Update pull.yml --- .github/workflows/pull.yml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/.github/workflows/pull.yml b/.github/workflows/pull.yml index bd9b53b..f491de7 100644 --- a/.github/workflows/pull.yml +++ b/.github/workflows/pull.yml @@ -17,17 +17,3 @@ jobs: - name: Hassfest validation uses: home-assistant/actions/hassfest@master - - style: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: Install Black - run: python3 -m pip install black - - - name: Run Black - run: black --check . From 1a4a64885dc7210c33a99795f7d84553b8c811f3 Mon Sep 17 00:00:00 2001 From: MattMorgan <48740594+spycle@users.noreply.github.com> Date: Sun, 29 Jun 2025 13:54:35 +0100 Subject: [PATCH 08/11] Update hacs.json --- hacs.json | 1 - 1 file changed, 1 deletion(-) diff --git a/hacs.json b/hacs.json index 6500950..18e5078 100644 --- a/hacs.json +++ b/hacs.json @@ -1,6 +1,5 @@ { "name": "TuneBlade", "content_in_root": false, - "domains": "media_player", "render_readme": true } From 96da937f268cbdd94f715a8495b4311cd7da4d22 Mon Sep 17 00:00:00 2001 From: MattMorgan <48740594+spycle@users.noreply.github.com> Date: Sun, 29 Jun 2025 13:59:11 +0100 Subject: [PATCH 09/11] Update manifest.json --- custom_components/tuneblade/manifest.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/custom_components/tuneblade/manifest.json b/custom_components/tuneblade/manifest.json index 420d2fd..c820d64 100644 --- a/custom_components/tuneblade/manifest.json +++ b/custom_components/tuneblade/manifest.json @@ -1,12 +1,12 @@ { "domain": "tuneblade", "name": "TuneBlade", + "version": "0.0.6", "documentation": "https://github.com/spycle/tuneblade", + "dependencies": [], + "codeowners": ["@spycle"], + "requirements": [], "iot_class": "local_polling", "issue_tracker": "https://github.com/spycle/tuneblade/issues", - "version": "0.0.5", - "config_flow": true, - "codeowners": [ - "@spycle" - ] + "config_flow": true } From b6d84ddf56a4695ac61adaa5b261f1debbf2529b Mon Sep 17 00:00:00 2001 From: MattMorgan <48740594+spycle@users.noreply.github.com> Date: Sun, 29 Jun 2025 14:05:37 +0100 Subject: [PATCH 10/11] Update __init__.py --- custom_components/tuneblade/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/custom_components/tuneblade/__init__.py b/custom_components/tuneblade/__init__.py index 72b4711..d4ff5b0 100644 --- a/custom_components/tuneblade/__init__.py +++ b/custom_components/tuneblade/__init__.py @@ -11,6 +11,7 @@ from homeassistant.exceptions import ConfigEntryNotReady from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed +from homeassistant.helpers import config_validation as cv from .tuneblade import TuneBladeApiClient @@ -26,6 +27,8 @@ STARTUP_MESSAGE, ) +CONFIG_SCHEMA = cv.config_entry_only_config_schema("tuneblade") + SCAN_INTERVAL = timedelta(seconds=30) _LOGGER: logging.Logger = logging.getLogger(__package__) From b098545ae72819a8263343c0ac51d49efb1b5965 Mon Sep 17 00:00:00 2001 From: MattMorgan <48740594+spycle@users.noreply.github.com> Date: Sun, 29 Jun 2025 14:07:46 +0100 Subject: [PATCH 11/11] Update manifest.json --- custom_components/tuneblade/manifest.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/custom_components/tuneblade/manifest.json b/custom_components/tuneblade/manifest.json index c820d64..1b17fa3 100644 --- a/custom_components/tuneblade/manifest.json +++ b/custom_components/tuneblade/manifest.json @@ -1,12 +1,12 @@ { "domain": "tuneblade", "name": "TuneBlade", - "version": "0.0.6", - "documentation": "https://github.com/spycle/tuneblade", - "dependencies": [], "codeowners": ["@spycle"], - "requirements": [], + "config_flow": true, + "dependencies": [], + "documentation": "https://github.com/spycle/tuneblade", "iot_class": "local_polling", "issue_tracker": "https://github.com/spycle/tuneblade/issues", - "config_flow": true + "requirements": [], + "version": "0.0.6" }