Skip to content

Commit

Permalink
suppress warning and deprecated function
Browse files Browse the repository at this point in the history
  • Loading branch information
jugla committed Sep 7, 2024
1 parent b382c1f commit 43f85c0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
10 changes: 6 additions & 4 deletions custom_components/worldtidesinfocustom/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,12 @@ async def async_setup_entry(hass, config_entry):

hass.data[DOMAIN][DATA_COORDINATOR][config_entry.entry_id] = coordinator

for platform in PLATFORMS:
hass.async_create_task(
hass.config_entries.async_forward_entry_setup(config_entry, platform)
)
#for platform in PLATFORMS:
# hass.async_create_task(
# hass.config_entries.async_forward_entry_setup(config_entry, platform)
# )

await hass.config_entries.async_forward_entry_setups(config_entry, PLATFORMS)

return True

Expand Down
3 changes: 2 additions & 1 deletion custom_components/worldtidesinfocustom/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1667,7 +1667,8 @@ async def async_added_to_hass(self):
# self.schedule_update_ha_state(force_refresh=True)

current_time = time.time()
self._worldtide_data_coordinator.check_if_tide_file_exist_for_init(current_time)
# self._worldtide_data_coordinator.check_if_tide_file_exist_for_init(current_time)
await self._hass.async_add_executor_job(self._worldtide_data_coordinator.check_if_tide_file_exist_for_init, current_time)

self.schedule_update_ha_state(force_refresh=True)

Expand Down

0 comments on commit 43f85c0

Please sign in to comment.