diff --git a/soliscloud/soliscloud.py b/soliscloud/soliscloud.py
--- a/soliscloud/soliscloud.py
+++ b/soliscloud/soliscloud.py
#
@@ -53,9 +53,10 @@ import time
#
- def __init__(self, config, session=False, debug=False):
#
+ def __init__(self, config, session=False, debug=False, mock=False):
#
@@ -210,6 +211,40 @@ class SolisCloud:
#
self.printDebug(f'Built request - Headers {headers}, body: {req_body}, path: {req_path}')
#
+ self.printDebug('Returning mocked response')
#
+ "stationStatusVo" : {
#
+ # Note: The API doc says this is a long
#
+ # but, the value returned to a similar call made by the cloud UI is a string
#
+ "capacityStr": "kWp",
#
+ "installerId" : 4567,
#
+ "dataTimestamp" : "1683905510946",
#
+ "dayEntergyStr" : "kWh",
#
+ "batteryTotalDischargeEnergy" : 0,
#
+ "batteryTotalChargeEnergy" : 0,
#
+ "condTxtD": "Cloudy",
#
f"{self.config['api_url']}{req_path}",
#
@@ -273,8 +308,13 @@ def configFromEnv():
#
if __name__ == "__main__":
#
# TODO: Take from environment
#
+ # TODO: This should eventually be false
#
+ # but having mock responses is the only way to proceed until I've got
#
config = configFromEnv()
#
- soliscloud = SolisCloud(config, debug=DEBUG)
#
+ soliscloud = SolisCloud(config, debug=DEBUG, mock=MOCK)
#
# These are the example values used in the API doc
#
print(soliscloud.doAuth('2424',
#
@@ -287,3 +327,4 @@ if __name__ == "__main__":
#
stations = soliscloud.fetchStationList()