mirror of
https://github.com/home-assistant/core.git
synced 2025-08-05 13:45:12 +02:00
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:
committed by
Pascal Vizeli
parent
ec7ca9a560
commit
2ac423bd9d
@@ -62,7 +62,7 @@ class Hyperion(Light):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def name(self):
|
def name(self):
|
||||||
"""Return the hostname of the server."""
|
"""Return the name of the light."""
|
||||||
return self._name
|
return self._name
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@@ -114,6 +114,7 @@ class Hyperion(Light):
|
|||||||
"""Get the hostname of the remote."""
|
"""Get the hostname of the remote."""
|
||||||
response = self.json_request({'command': 'serverinfo'})
|
response = self.json_request({'command': 'serverinfo'})
|
||||||
if response:
|
if response:
|
||||||
|
if self._name == self._host:
|
||||||
self._name = response['info']['hostname']
|
self._name = response['info']['hostname']
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
Reference in New Issue
Block a user