diff --git a/hassio/api/util.py b/hassio/api/util.py index 56dfb348a..50bf94ef2 100644 --- a/hassio/api/util.py +++ b/hassio/api/util.py @@ -68,9 +68,9 @@ def api_return_error(message=None): }) -def api_return_ok(data=dict()): +def api_return_ok(data=None): """Return a API ok answer.""" return web.json_response({ JSON_RESULT: RESULT_OK, - JSON_DATA: data, + JSON_DATA: data or {}, })