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
This commit is contained in:
1 parent
ec7ca9a560
commit
2ac423bd9d
1 file changed
+3
-2
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user