diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index aa2a0ed..738416c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -19,7 +19,7 @@ jobs: - name: "Set up Python" uses: actions/setup-python@v4.7.0 with: - python-version: "3.10" + python-version: "3.12" cache: "pip" - name: "Install requirements" diff --git a/custom_components/chore_helper/__init__.py b/custom_components/chore_helper/__init__.py index d7560c0..ff627a8 100644 --- a/custom_components/chore_helper/__init__.py +++ b/custom_components/chore_helper/__init__.py @@ -23,6 +23,8 @@ from . import const, helpers from .const import LOGGER +PLATFORMS: list[str] = [const.SENSOR_PLATFORM] + MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=30) months = [m["value"] for m in const.MONTH_OPTIONS] @@ -231,12 +233,9 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b config_entry.options[const.CONF_FREQUENCY], ) config_entry.add_update_listener(update_listener) + # Add sensor - hass.async_create_task( - hass.config_entries.async_forward_entry_setup( - config_entry, const.SENSOR_PLATFORM - ) - ) + await hass.config_entries.async_forward_entry_setups(config_entry, PLATFORMS) return True