Skip to content

Conversation

@alissonzima
Copy link

server_url change, same as pr #62
endpoint for plant_detail changed from PlantDetailAPI to newPlantDetailAPI, retrieving complete date on data dict
added 2 more timespan options, year and all

class Timespan(IntEnum):
   hour = 0
   day = 1
   month = 2
   year = 3
   all = 4

else:
elif timespan == Timespan.day or timespan == Timespan.hour:
date_str = date.strftime('%Y-%m-%d')
else:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you reorder the if statement to have %Y at the top, %Y-%m after the and %Y-%m-%d at the bottom? Helps with reading through the code faster 🙂


class GrowattApi:
server_url = 'https://server-api.growatt.com/'
server_url = 'https://server.growatt.com/'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

server-api.growatt.com is still the URL being used by the app, as not everyone is having issues with the current URL and the new URL might respond differently.
It could cause issues in currently running code.
It's best to overwrite this URL in the scripts using it

Suggested change
server_url = 'https://server.growatt.com/'
server_url = 'https://server-api.growatt.com/'

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is outdated, see #77

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants