From 7ab21ef4ebf095a74735739260b43a2167155032 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= <dev@schuetz-co.de>
Date: Wed, 9 Oct 2019 17:46:00 +0200
Subject: [PATCH] esphome: 1.12.2 -> 1.13.6

---
 pkgs/servers/home-assistant/esphome.nix | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/pkgs/servers/home-assistant/esphome.nix b/pkgs/servers/home-assistant/esphome.nix
index 775731babd6..b5f6af3e483 100644
--- a/pkgs/servers/home-assistant/esphome.nix
+++ b/pkgs/servers/home-assistant/esphome.nix
@@ -1,4 +1,4 @@
-{ lib, python3, platformio, esptool, git, protobuf3_7 }:
+{ lib, python3, platformio, esptool, git, protobuf3_7, fetchpatch }:
 
 let
   python = python3.override {
@@ -18,11 +18,17 @@ let
 
 in python.pkgs.buildPythonApplication rec {
   pname = "esphome";
-  version = "1.12.2";
+  version = "1.13.6";
 
   src = python.pkgs.fetchPypi {
     inherit pname version;
-    sha256 = "935fc3d0f05b2f5911c29f60c9b5538bed584a31455b492944007d8b1524462c";
+    sha256 = "53148fc43c6cc6736cb7aa4cc1189caa305812061f55289ff916f8bd731ac623";
+  };
+
+  patches = fetchpatch {
+    url = https://github.com/esphome/esphome/pull/694.patch;
+    includes = [ "esphome/voluptuous_schema.py" ];
+    sha256 = "0i2v1d6mcgc94i9rkaqmls7iyfbaisdji41sfc7bh7cf2j824im9";
   };
 
   ESPHOME_USE_SUBPROCESS = "";