Fix dashboard setup for python 3

This commit is contained in:
Otto Winter 2019-10-19 15:48:57 +02:00
parent 9f4b666ef0
commit 28454ea4cd
No known key found for this signature in database
GPG key ID: DB66C0BE6013F97E

View file

@ -13,6 +13,7 @@ from esphome.helpers import mkdir_p
from esphome.core import CoreType # noqa from esphome.core import CoreType # noqa
from typing import Any, Dict, Optional # noqa from typing import Any, Dict, Optional # noqa
from esphome.py_compat import text_type
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
@ -221,7 +222,7 @@ class EsphomeStorageJSON(object):
def get_default(): # type: () -> EsphomeStorageJSON def get_default(): # type: () -> EsphomeStorageJSON
return EsphomeStorageJSON( return EsphomeStorageJSON(
storage_version=1, storage_version=1,
cookie_secret=binascii.hexlify(os.urandom(64)), cookie_secret=text_type(binascii.hexlify(os.urandom(64))),
last_update_check=None, last_update_check=None,
remote_version=None, remote_version=None,
) )