mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 04:07:08 +00:00
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
@ -54,12 +54,12 @@ MAPPING_COMPONENT = {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
cover.DOMAIN: [
|
cover.DOMAIN: [
|
||||||
TYPE_LIGHT, TRAIT_ONOFF, {
|
TYPE_SWITCH, TRAIT_ONOFF, {
|
||||||
cover.SUPPORT_SET_POSITION: TRAIT_BRIGHTNESS
|
cover.SUPPORT_SET_POSITION: TRAIT_BRIGHTNESS
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
media_player.DOMAIN: [
|
media_player.DOMAIN: [
|
||||||
TYPE_LIGHT, TRAIT_ONOFF, {
|
TYPE_SWITCH, TRAIT_ONOFF, {
|
||||||
media_player.SUPPORT_VOLUME_SET: TRAIT_BRIGHTNESS
|
media_player.SUPPORT_VOLUME_SET: TRAIT_BRIGHTNESS
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -95,7 +95,7 @@ DEMO_DEVICES = [{
|
|||||||
'traits':
|
'traits':
|
||||||
['action.devices.traits.OnOff', 'action.devices.traits.Brightness'],
|
['action.devices.traits.OnOff', 'action.devices.traits.Brightness'],
|
||||||
'type':
|
'type':
|
||||||
'action.devices.types.LIGHT',
|
'action.devices.types.SWITCH',
|
||||||
'willReportState':
|
'willReportState':
|
||||||
False
|
False
|
||||||
}, {
|
}, {
|
||||||
@ -107,7 +107,7 @@ DEMO_DEVICES = [{
|
|||||||
'traits':
|
'traits':
|
||||||
['action.devices.traits.OnOff', 'action.devices.traits.Brightness'],
|
['action.devices.traits.OnOff', 'action.devices.traits.Brightness'],
|
||||||
'type':
|
'type':
|
||||||
'action.devices.types.LIGHT',
|
'action.devices.types.SWITCH',
|
||||||
'willReportState':
|
'willReportState':
|
||||||
False
|
False
|
||||||
}, {
|
}, {
|
||||||
@ -116,7 +116,7 @@ DEMO_DEVICES = [{
|
|||||||
'name': 'Garage Door'
|
'name': 'Garage Door'
|
||||||
},
|
},
|
||||||
'traits': ['action.devices.traits.OnOff'],
|
'traits': ['action.devices.traits.OnOff'],
|
||||||
'type': 'action.devices.types.LIGHT',
|
'type': 'action.devices.types.SWITCH',
|
||||||
'willReportState': False
|
'willReportState': False
|
||||||
}, {
|
}, {
|
||||||
'id': 'cover.kitchen_window',
|
'id': 'cover.kitchen_window',
|
||||||
@ -124,7 +124,7 @@ DEMO_DEVICES = [{
|
|||||||
'name': 'Kitchen Window'
|
'name': 'Kitchen Window'
|
||||||
},
|
},
|
||||||
'traits': ['action.devices.traits.OnOff'],
|
'traits': ['action.devices.traits.OnOff'],
|
||||||
'type': 'action.devices.types.LIGHT',
|
'type': 'action.devices.types.SWITCH',
|
||||||
'willReportState': False
|
'willReportState': False
|
||||||
}, {
|
}, {
|
||||||
'id': 'group.all_covers',
|
'id': 'group.all_covers',
|
||||||
@ -143,7 +143,7 @@ DEMO_DEVICES = [{
|
|||||||
'traits':
|
'traits':
|
||||||
['action.devices.traits.OnOff', 'action.devices.traits.Brightness'],
|
['action.devices.traits.OnOff', 'action.devices.traits.Brightness'],
|
||||||
'type':
|
'type':
|
||||||
'action.devices.types.LIGHT',
|
'action.devices.types.SWITCH',
|
||||||
'willReportState':
|
'willReportState':
|
||||||
False
|
False
|
||||||
}, {
|
}, {
|
||||||
@ -155,7 +155,7 @@ DEMO_DEVICES = [{
|
|||||||
'traits':
|
'traits':
|
||||||
['action.devices.traits.OnOff', 'action.devices.traits.Brightness'],
|
['action.devices.traits.OnOff', 'action.devices.traits.Brightness'],
|
||||||
'type':
|
'type':
|
||||||
'action.devices.types.LIGHT',
|
'action.devices.types.SWITCH',
|
||||||
'willReportState':
|
'willReportState':
|
||||||
False
|
False
|
||||||
}, {
|
}, {
|
||||||
@ -164,7 +164,7 @@ DEMO_DEVICES = [{
|
|||||||
'name': 'Lounge room'
|
'name': 'Lounge room'
|
||||||
},
|
},
|
||||||
'traits': ['action.devices.traits.OnOff'],
|
'traits': ['action.devices.traits.OnOff'],
|
||||||
'type': 'action.devices.types.LIGHT',
|
'type': 'action.devices.types.SWITCH',
|
||||||
'willReportState': False
|
'willReportState': False
|
||||||
}, {
|
}, {
|
||||||
'id':
|
'id':
|
||||||
@ -175,7 +175,7 @@ DEMO_DEVICES = [{
|
|||||||
'traits':
|
'traits':
|
||||||
['action.devices.traits.OnOff', 'action.devices.traits.Brightness'],
|
['action.devices.traits.OnOff', 'action.devices.traits.Brightness'],
|
||||||
'type':
|
'type':
|
||||||
'action.devices.types.LIGHT',
|
'action.devices.types.SWITCH',
|
||||||
'willReportState':
|
'willReportState':
|
||||||
False
|
False
|
||||||
}, {
|
}, {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user