mirror of
https://github.com/home-assistant/core.git
synced 2025-07-26 22:57:17 +00:00
Add fallback for name if userdevicename isn't set using old serialnumber logic (#6265)
Add an optional extended description…
This commit is contained in:
parent
46f5a65e68
commit
c03022efa3
@ -123,7 +123,10 @@ class RokuDevice(MediaPlayerDevice):
|
|||||||
@property
|
@property
|
||||||
def name(self):
|
def name(self):
|
||||||
"""Return the name of the device."""
|
"""Return the name of the device."""
|
||||||
|
if self.device_info.userdevicename:
|
||||||
return self.device_info.userdevicename
|
return self.device_info.userdevicename
|
||||||
|
else:
|
||||||
|
return "roku_" + self.roku.device_info.sernum
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def state(self):
|
def state(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user