Tags the name of the device to the end of the name
This helps the media player be more explicit about itself and what it is. It also namespaces it self a little better in the system. Rather than be `media_player.family_room` it is `media_player.family_room_apple_tv`. This helps for cases when there’s another actual media player like Kodi or Chromecast in there.
This commit is contained in:
parent
08f2a67de4
commit
77b9a12687
1 changed files with 4 additions and 1 deletions
|
@ -356,7 +356,10 @@ class AirPlayDevice(MediaPlayerDevice):
|
|||
self.player_state = state_hash.get('player_state', None)
|
||||
|
||||
if 'name' in state_hash:
|
||||
self.device_name = state_hash.get('name', 'AirPlay')
|
||||
name = state_hash.get('name', '')
|
||||
kind = state_hash.get('kind', 'AirPlay')
|
||||
|
||||
self.device_name = (name + ' ' + kind).strip()
|
||||
|
||||
if 'kind' in state_hash:
|
||||
self.kind = state_hash.get('kind', None)
|
||||
|
|
Loading…
Add table
Reference in a new issue