Skip to content
Permalink
Browse files

Update mock_hassio server

  • Loading branch information...
sabeechen committed May 3, 2019
1 parent 1b26710 commit 8673667dc8ffec8eca9a7c08c0617a8d5567485a
Showing with 6 additions and 5 deletions.
  1. +1 −0 .gitignore
  2. +5 −5 dev/mock_hassio.py
@@ -9,3 +9,4 @@ dev/backup/*.tar
hassio-google-drive-backup/backup/__pycache__/server.cpython-37.pyc.16291344
.vscode/tags
dev/error.py
dev/data/retained.json
@@ -23,7 +23,7 @@
app.secret_key = "super secret key"

snapshots: List[Dict[Any, Any]] = []
NEW_SNAPSHOT_SLEEP_SECONDS = 1
NEW_SNAPSHOT_SLEEP_SECONDS = 30
TAR_FILE = "sample_tar.tar"
BACKUP_DIR = "backup"
snapshotting = False
@@ -276,9 +276,9 @@ def hostInfo() -> str:
@app.route('/info', methods=['GET'])
def selfInfo() -> str:
return formatDataResponse({
"supervisor": "version",
"homeassistant": "0.91.3",
"hassos": "null|version",
"supervisor": None,
"homeassistant": None,
"hassos": None,
"hostname": "localhost",
"machine": "type",
"arch": "arch",
@@ -306,7 +306,7 @@ def setBackupState() -> str:
@app.route("/homeassistant/api/states/binary_sensor.snapshots_stale", methods=['POST'])
def setBinarySensorState() -> str:
print("Updated snapshot stale sensor with: {}".format(request.get_json()))
return "", status.HTTP_502_BAD_GATEWAY
#return "", status.HTTP_502_BAD_GATEWAY
return ""


0 comments on commit 8673667

Please sign in to comment.
You can’t perform that action at this time.