From 2a653642f50c580d59e3fc7b87c6eca4400b9537 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Mon, 6 Sep 2021 08:57:37 +1200 Subject: [PATCH] Fix encoding bug (#2242) --- esphome/dashboard/dashboard.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/esphome/dashboard/dashboard.py b/esphome/dashboard/dashboard.py index a5e9766eea..ab9dd39735 100644 --- a/esphome/dashboard/dashboard.py +++ b/esphome/dashboard/dashboard.py @@ -608,9 +608,7 @@ class EditRequestHandler(BaseHandler): @bind_config def post(self, configuration=None): # pylint: disable=no-value-for-parameter - with open( - file=settings.rel_path(configuration), mode="wb", encoding="utf-8" - ) as f: + with open(file=settings.rel_path(configuration), mode="wb") as f: f.write(self.request.body) self.set_status(200)