Skip to content

Commit

Permalink
feat: Optimizaiton - Disable fetching Daily data (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuyKh authored Nov 22, 2024
2 parents f061bc9 + 8d66d2f commit a2088df
Showing 1 changed file with 8 additions and 7 deletions.
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

0 comments on commit a2088df

Please sign in to comment.