Skip to content

Commit

Permalink
Rename constant
Browse files Browse the repository at this point in the history
  • Loading branch information
faanskit committed Jan 27, 2024
1 parent a90b9e5 commit 19094c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions custom_components/checkwatt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
CONF_POWER_SENSORS,
CONF_PUSH_CW_TO_RANK,
CONF_UPDATE_INTERVAL_ALL,
CONF_UPDATE_INTERVAL_NON_POWER,
CONF_UPDATE_INTERVAL_MONETARY,
DOMAIN,
EVENT_SIGNAL_FCRD,
INTEGRATION_NAME,
Expand Down Expand Up @@ -200,7 +200,7 @@ async def _async_update_data(self) -> CheckwattResp: # noqa: C901

# Only fetch some parameters every 15 min
if self.update_all == 0 and not self.is_boot:
self.update_all = CONF_UPDATE_INTERVAL_NON_POWER
self.update_all = CONF_UPDATE_INTERVAL_MONETARY
_LOGGER.debug("Fetching daily revenue")
if not await cw_inst.get_fcrd_today_net_revenue():
raise UpdateFailed("Unknown error get_fcrd_revenue")
Expand Down Expand Up @@ -299,7 +299,7 @@ async def _async_update_data(self) -> CheckwattResp: # noqa: C901

update_time = dt_util.now().strftime("%Y-%m-%d %H:%M:%S")
next_update = dt_util.now() + timedelta(
minutes=CONF_UPDATE_INTERVAL_NON_POWER
minutes=CONF_UPDATE_INTERVAL_MONETARY
)
next_update_time = next_update.strftime("%Y-%m-%d %H:%M:%S")
resp["update_time"] = update_time
Expand Down
2 changes: 1 addition & 1 deletion custom_components/checkwatt/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

# Update interval for regular sensors is once every minute
CONF_UPDATE_INTERVAL_ALL = 1
CONF_UPDATE_INTERVAL_NON_POWER = 15
CONF_UPDATE_INTERVAL_MONETARY = 15
ATTRIBUTION = "Data provided by CheckWatt EnergyInBalance"
MANUFACTURER = "CheckWatt"
CHECKWATT_MODEL = "CheckWatt"
Expand Down

0 comments on commit 19094c8

Please sign in to comment.