From 28454ea4cd257904ac7089c28c7129ca575ca876 Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Sat, 19 Oct 2019 15:48:57 +0200 Subject: [PATCH] Fix dashboard setup for python 3 --- esphome/storage_json.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/esphome/storage_json.py b/esphome/storage_json.py index a7431d0c56..cac7f9d2fa 100644 --- a/esphome/storage_json.py +++ b/esphome/storage_json.py @@ -13,6 +13,7 @@ from esphome.helpers import mkdir_p from esphome.core import CoreType # noqa from typing import Any, Dict, Optional # noqa +from esphome.py_compat import text_type _LOGGER = logging.getLogger(__name__) @@ -221,7 +222,7 @@ class EsphomeStorageJSON(object): def get_default(): # type: () -> EsphomeStorageJSON return EsphomeStorageJSON( storage_version=1, - cookie_secret=binascii.hexlify(os.urandom(64)), + cookie_secret=text_type(binascii.hexlify(os.urandom(64))), last_update_check=None, remote_version=None, )