Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Optimizaiton - Disable fetching Daily data #25

Merged
merged 2 commits into from
Nov 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions custom_components/ims_envista/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from ims_envista import ImsEnvistaApiClientAuthenticationError, ImsEnvistaApiClientError

from .const import DAILY_KEY, DOMAIN, LATEST_KEY, LOGGER
from .const import DOMAIN, LATEST_KEY, LOGGER

if TYPE_CHECKING:
from homeassistant.core import HomeAssistant
Expand Down Expand Up @@ -97,12 +97,13 @@ async def _async_update_data(self) -> Any:
LOGGER.debug("Station %d latest data: %s", station, station_latest)
station_data[station][LATEST_KEY] = station_latest

station_daily = (
await self.config_entry.runtime_data.client.get_daily_station_data(
station
)
)
station_data[station][DAILY_KEY] = station_daily.data
# station_daily = (
# await self.config_entry.runtime_data.client.get_daily_station_data
# (
# station
# )
# )
# station_data[station][DAILY_KEY] = station_daily.data

except ImsEnvistaApiClientAuthenticationError as exception:
raise ConfigEntryAuthFailed(exception) from exception
Expand Down