Skip to content

Commit

Permalink
Timezones weren't a good idea
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan authored and nathanmarlor committed Mar 26, 2023
1 parent 1eb5433 commit c4279e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion custom_components/foxess_em/battery/battery_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,11 @@ def _charge_totals(
):
"""Return charge totals for dawn/day"""
# calculate start/end of the next peak period
eco_start = period.replace(
now = datetime.now().astimezone()
eco_start = now.replace(
year=period.year,
month=period.month,
day=period.day,
hour=self._eco_start_time.hour,
minute=self._eco_start_time.minute,
second=0,
Expand Down
2 changes: 1 addition & 1 deletion custom_components/foxess_em/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# Configuration and options
SOLCAST_API_KEY = "key"
SOLCAST_SCAN_INTERVAL = "scan_interval"
# SOLCAST_URL = "https://61b90ede-0458-4ebe-b5ad-a300063ab299.mock.pstmn.io"
# SOLCAST_URL = "https://364c31d2-231a-4a41-a7ee-6b0f357fdb75.mock.pstmn.io"
SOLCAST_URL = "https://api.solcast.com.au"

FORECAST = "sensor.foxess_em_forecast"
Expand Down

0 comments on commit c4279e7

Please sign in to comment.