From 12dae4b6a65b4705c5ec32bd05c97053bc4150ac Mon Sep 17 00:00:00 2001 From: Mario Guggenberger Date: Sun, 11 Jun 2023 23:12:37 +0200 Subject: [PATCH] fix: 2023.6 compatibility (#607) * fix: 2023.6.0 compatibility * ci: test with Python 3.11 against 2023.6.0b4 * Set 2023.06.0 * Bump to 2023.06.1 --------- Co-authored-by: Bas Nijholt --- .github/workflows/pytest.yaml | 15 +++++++++++++-- custom_components/adaptive_lighting/switch.py | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 4973849f..1b51f257 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -13,8 +13,19 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.10"] - core-version: ["2023.2.5", "2023.3.6", "2023.4.6", "2023.5.2", "dev"] + include: + - python-version: "3.10" + core-version: "2023.2.5" + - python-version: "3.10" + core-version: "2023.3.6" + - python-version: "3.10" + core-version: "2023.4.6" + - python-version: "3.10" + core-version: "2023.5.2" + - python-version: "3.11" + core-version: "2023.6.1" + - python-version: "3.11" + core-version: "dev" steps: - name: Check out code from GitHub uses: actions/checkout@v3 diff --git a/custom_components/adaptive_lighting/switch.py b/custom_components/adaptive_lighting/switch.py index 32d3661a..4d36fce1 100644 --- a/custom_components/adaptive_lighting/switch.py +++ b/custom_components/adaptive_lighting/switch.py @@ -502,7 +502,7 @@ async def async_setup_entry( data[config_entry.entry_id][SWITCH_DOMAIN] = switch async_add_entities( - [switch, sleep_mode_switch, adapt_color_switch, adapt_brightness_switch], + [sleep_mode_switch, adapt_color_switch, adapt_brightness_switch, switch], update_before_add=True, )