Changed device type of media player and cover to switch (#11483)
* Changed device type of media player and cover to switch Covers and media players should not be of device type 'light'. Example: If user requests all lights to switch to off, covers are closed and media players are affected too. * Fix test
This commit is contained in:
parent
a35d05ac7e
commit
1235dae5b8
2 changed files with 10 additions and 10 deletions
|
@ -54,12 +54,12 @@ MAPPING_COMPONENT = {
|
|||
}
|
||||
],
|
||||
cover.DOMAIN: [
|
||||
TYPE_LIGHT, TRAIT_ONOFF, {
|
||||
TYPE_SWITCH, TRAIT_ONOFF, {
|
||||
cover.SUPPORT_SET_POSITION: TRAIT_BRIGHTNESS
|
||||
}
|
||||
],
|
||||
media_player.DOMAIN: [
|
||||
TYPE_LIGHT, TRAIT_ONOFF, {
|
||||
TYPE_SWITCH, TRAIT_ONOFF, {
|
||||
media_player.SUPPORT_VOLUME_SET: TRAIT_BRIGHTNESS
|
||||
}
|
||||
],
|
||||
|
|
|
@ -95,7 +95,7 @@ DEMO_DEVICES = [{
|
|||
'traits':
|
||||
['action.devices.traits.OnOff', 'action.devices.traits.Brightness'],
|
||||
'type':
|
||||
'action.devices.types.LIGHT',
|
||||
'action.devices.types.SWITCH',
|
||||
'willReportState':
|
||||
False
|
||||
}, {
|
||||
|
@ -107,7 +107,7 @@ DEMO_DEVICES = [{
|
|||
'traits':
|
||||
['action.devices.traits.OnOff', 'action.devices.traits.Brightness'],
|
||||
'type':
|
||||
'action.devices.types.LIGHT',
|
||||
'action.devices.types.SWITCH',
|
||||
'willReportState':
|
||||
False
|
||||
}, {
|
||||
|
@ -116,7 +116,7 @@ DEMO_DEVICES = [{
|
|||
'name': 'Garage Door'
|
||||
},
|
||||
'traits': ['action.devices.traits.OnOff'],
|
||||
'type': 'action.devices.types.LIGHT',
|
||||
'type': 'action.devices.types.SWITCH',
|
||||
'willReportState': False
|
||||
}, {
|
||||
'id': 'cover.kitchen_window',
|
||||
|
@ -124,7 +124,7 @@ DEMO_DEVICES = [{
|
|||
'name': 'Kitchen Window'
|
||||
},
|
||||
'traits': ['action.devices.traits.OnOff'],
|
||||
'type': 'action.devices.types.LIGHT',
|
||||
'type': 'action.devices.types.SWITCH',
|
||||
'willReportState': False
|
||||
}, {
|
||||
'id': 'group.all_covers',
|
||||
|
@ -143,7 +143,7 @@ DEMO_DEVICES = [{
|
|||
'traits':
|
||||
['action.devices.traits.OnOff', 'action.devices.traits.Brightness'],
|
||||
'type':
|
||||
'action.devices.types.LIGHT',
|
||||
'action.devices.types.SWITCH',
|
||||
'willReportState':
|
||||
False
|
||||
}, {
|
||||
|
@ -155,7 +155,7 @@ DEMO_DEVICES = [{
|
|||
'traits':
|
||||
['action.devices.traits.OnOff', 'action.devices.traits.Brightness'],
|
||||
'type':
|
||||
'action.devices.types.LIGHT',
|
||||
'action.devices.types.SWITCH',
|
||||
'willReportState':
|
||||
False
|
||||
}, {
|
||||
|
@ -164,7 +164,7 @@ DEMO_DEVICES = [{
|
|||
'name': 'Lounge room'
|
||||
},
|
||||
'traits': ['action.devices.traits.OnOff'],
|
||||
'type': 'action.devices.types.LIGHT',
|
||||
'type': 'action.devices.types.SWITCH',
|
||||
'willReportState': False
|
||||
}, {
|
||||
'id':
|
||||
|
@ -175,7 +175,7 @@ DEMO_DEVICES = [{
|
|||
'traits':
|
||||
['action.devices.traits.OnOff', 'action.devices.traits.Brightness'],
|
||||
'type':
|
||||
'action.devices.types.LIGHT',
|
||||
'action.devices.types.SWITCH',
|
||||
'willReportState':
|
||||
False
|
||||
}, {
|
||||
|
|
Loading…
Add table
Reference in a new issue