Skip to content

Commit

Permalink
Fix deprecated usage of async_forward_entry_setup (#45)
Browse files Browse the repository at this point in the history
* Call async_forward_entry_setups instead of async_forward_entry_setup to fix deprecated usage

* Update python version in lint action
  • Loading branch information
bmcclure authored Jul 7, 2024
1 parent 59601c2 commit fb78f1e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
9 changes: 4 additions & 5 deletions custom_components/chore_helper/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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


Expand Down

0 comments on commit fb78f1e

Please sign in to comment.