From f57e307c7ad9aad1ff7a4efa0d3857d7ca0f2539 Mon Sep 17 00:00:00 2001
From: Teemu R <tpr@iki.fi>
Date: Mon, 23 Oct 2017 09:41:47 +0200
Subject: [PATCH] switch.tplink: fix overlooked issue with statically defined
 names (#10053)

---
 homeassistant/components/switch/tplink.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/homeassistant/components/switch/tplink.py b/homeassistant/components/switch/tplink.py
index df0050ff979..8fa6493862c 100644
--- a/homeassistant/components/switch/tplink.py
+++ b/homeassistant/components/switch/tplink.py
@@ -45,7 +45,7 @@ class SmartPlugSwitch(SwitchDevice):
     def __init__(self, smartplug, name):
         """Initialize the switch."""
         self.smartplug = smartplug
-        self._name = None
+        self._name = name
         self._state = None
         # Set up emeter cache
         self._emeter_params = {}
-- 
GitLab