Skip to content

Commit

Permalink
Fix Clientdate
Browse files Browse the repository at this point in the history
Another go at fixing the 24 hour issue.
  • Loading branch information
djansen1987 committed Aug 28, 2021
1 parent 63c2a28 commit 670a30e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/saj_esolar/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def add_years(d, years):
except ValueError:
return d + (date(d.year + years, 1, 1) - date(d.year, 1, 1))

currentdate = datetime.date.today().strftime('%Y-%m-%d')
#currentdate = datetime.date.today().strftime('%Y-%m-%d')

BASE_URL = 'https://fop.saj-electric.com/saj/login'
_LOGGER = logging.getLogger(__name__)
Expand Down Expand Up @@ -448,7 +448,7 @@ async def async_update(self):

# Get API Plant Solar Details
url3 = "https://fop.saj-electric.com/saj/monitor/site/getPlantDetailInfo"
payload3="plantuid={}&clientDate={}".format(plantuid,currentdate)
payload3="plantuid={}&clientDate={}".format(plantuid,clientDate)
headers3 = {
'Connection': 'keep-alive',
'sec-ch-ua': '" Not;A Brand";v="99", "Google Chrome";v="91", "Chromium";v="91"',
Expand Down

0 comments on commit 670a30e

Please sign in to comment.