From 2ac423bd9d464d705e4375981de39afdf4d1df8d Mon Sep 17 00:00:00 2001 From: James Marsh Date: Sun, 9 Jul 2017 23:06:31 +0100 Subject: [PATCH] Do not overwrite a custom hyperion light name with the hostname of the server. (#8391) Do not overwrite a custom name with the hostname of the hyperion server. Correct comment in name() method. Fixes #8390 --- homeassistant/components/light/hyperion.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/light/hyperion.py b/homeassistant/components/light/hyperion.py index 99fc557af20..ec91ba582fb 100644 --- a/homeassistant/components/light/hyperion.py +++ b/homeassistant/components/light/hyperion.py @@ -62,7 +62,7 @@ class Hyperion(Light): @property def name(self): - """Return the hostname of the server.""" + """Return the name of the light.""" return self._name @property @@ -114,7 +114,8 @@ class Hyperion(Light): """Get the hostname of the remote.""" response = self.json_request({'command': 'serverinfo'}) if response: - self._name = response['info']['hostname'] + if self._name == self._host: + self._name = response['info']['hostname'] return True return False