Skip to content

Commit

Permalink
Move 'main' to function
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronjbrown committed May 1, 2021
1 parent 5d9b4d0 commit b2dc1f0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/growatt_pvoutput.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def pv_status_upload(datastore, interval):
return


if __name__ == "__main__":
def main():
# ----------------------------------------------------------------------- #
# load the config from file
# ----------------------------------------------------------------------- #
Expand Down Expand Up @@ -151,3 +151,7 @@ def pv_status_upload(datastore, interval):
# periodically upload the data to pvoutput.org
# ----------------------------------------------------------------------- #
pv_status_upload(store, int(config['Pvoutput']['StatusInterval']) * 60)


if __name__ == "__main__":
main()

0 comments on commit b2dc1f0

Please sign in to comment.