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
1 changed files with 4 additions and 1 deletions
|
@ -123,7 +123,10 @@ class RokuDevice(MediaPlayerDevice):
|
|||
@property
|
||||
def name(self):
|
||||
"""Return the name of the device."""
|
||||
return self.device_info.userdevicename
|
||||
if self.device_info.userdevicename:
|
||||
return self.device_info.userdevicename
|
||||
else:
|
||||
return "roku_" + self.roku.device_info.sernum
|
||||
|
||||
@property
|
||||
def state(self):
|
||||
|
|
Loading…
Add table
Reference in a new issue