mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Bugfix for media player supported media commands
This commit is contained in:
parent
2ea195a5d2
commit
cac1c0d415
@ -167,7 +167,7 @@
|
||||
},
|
||||
|
||||
computeHidePowerButton: function(isOff, supportsTurnOn, supportsTurnOff) {
|
||||
return isOff && !supportsTurnOn || !isOff && supportsTurnOff;
|
||||
return isOff ? !supportsTurnOn : !supportsTurnOff;
|
||||
},
|
||||
|
||||
handleTogglePower: function() {
|
||||
|
@ -487,7 +487,9 @@ class MediaPlayerDevice(Entity):
|
||||
def state_attributes(self):
|
||||
""" Return the state attributes. """
|
||||
if self.state == STATE_OFF:
|
||||
state_attr = {}
|
||||
state_attr = {
|
||||
ATTR_SUPPORTED_MEDIA_COMMANDS: self.supported_media_commands,
|
||||
}
|
||||
else:
|
||||
state_attr = {
|
||||
attr: getattr(self, attr) for attr
|
||||
|
Loading…
x
Reference in New Issue
Block a user