Update ZHA remotes registry to proper identify "remotes (#31146)

* Update ZHA remote device types.

* Remove `binary_sensor` entity from affected devices.

* Update ZHA Profiles.

Prevent DeviceType.ON_OFF_LIGHT_SWITCH from creating entities.

* Update tests and remove unused entities.
This commit is contained in:
Alexei Chetroi 2020-01-25 12:42:19 -05:00 committed by David F. Mulcahey
parent 80a55360dc
commit 217e280f8b
2 changed files with 7 additions and 20 deletions

View File

@ -44,8 +44,11 @@ REMOTE_DEVICE_TYPES = {
zigpy.profiles.zha.DeviceType.COLOR_DIMMER_SWITCH,
zigpy.profiles.zha.DeviceType.COLOR_SCENE_CONTROLLER,
zigpy.profiles.zha.DeviceType.DIMMER_SWITCH,
zigpy.profiles.zha.DeviceType.LEVEL_CONTROL_SWITCH,
zigpy.profiles.zha.DeviceType.NON_COLOR_CONTROLLER,
zigpy.profiles.zha.DeviceType.NON_COLOR_SCENE_CONTROLLER,
zigpy.profiles.zha.DeviceType.ON_OFF_SWITCH,
zigpy.profiles.zha.DeviceType.ON_OFF_LIGHT_SWITCH,
zigpy.profiles.zha.DeviceType.REMOTE_CONTROL,
zigpy.profiles.zha.DeviceType.SCENE_SELECTOR,
],
@ -104,7 +107,6 @@ DEVICE_CLASS = {
zigpy.profiles.zha.DeviceType.LEVEL_CONTROLLABLE_OUTPUT: LIGHT,
zigpy.profiles.zha.DeviceType.ON_OFF_BALLAST: SWITCH,
zigpy.profiles.zha.DeviceType.ON_OFF_LIGHT: LIGHT,
zigpy.profiles.zha.DeviceType.ON_OFF_LIGHT_SWITCH: SWITCH,
zigpy.profiles.zha.DeviceType.ON_OFF_PLUG_IN_UNIT: SWITCH,
zigpy.profiles.zha.DeviceType.SMART_PLUG: SWITCH,
},

View File

@ -45,10 +45,7 @@ DEVICES = [
"profile_id": 260,
}
},
"entities": [
"binary_sensor.centralite_3130_77665544_on_off",
"sensor.centralite_3130_77665544_power",
],
"entities": ["sensor.centralite_3130_77665544_power"],
"event_channels": [6, 8],
"manufacturer": "CentraLite",
"model": "3130",
@ -553,7 +550,6 @@ DEVICES = [
},
"entities": [
"sensor.jasco_products_45856_77665544_smartenergy_metering",
"switch.jasco_products_45856_77665544_on_off",
"light.jasco_products_45856_77665544_on_off",
],
"event_channels": [6],
@ -1001,10 +997,7 @@ DEVICES = [
"profile_id": -1,
},
},
"entities": [
"sensor.lumi_lumi_remote_b486opcn01_77665544_power",
"switch.lumi_lumi_remote_b486opcn01_77665544_on_off",
],
"entities": ["sensor.lumi_lumi_remote_b486opcn01_77665544_power"],
"event_channels": [6, 8, 768, 6],
"manufacturer": "LUMI",
"model": "lumi.remote.b486opcn01",
@ -1054,10 +1047,7 @@ DEVICES = [
"profile_id": None,
},
},
"entities": [
"sensor.lumi_lumi_remote_b686opcn01_77665544_power",
"switch.lumi_lumi_remote_b686opcn01_77665544_on_off",
],
"entities": ["sensor.lumi_lumi_remote_b686opcn01_77665544_power"],
"event_channels": [6, 8, 768, 6],
"manufacturer": "LUMI",
"model": "lumi.remote.b686opcn01",
@ -1372,10 +1362,7 @@ DEVICES = [
"profile_id": 260,
}
},
"entities": [
"binary_sensor.osram_lightify_dimming_switch_77665544_on_off",
"sensor.osram_lightify_dimming_switch_77665544_power",
],
"entities": ["sensor.osram_lightify_dimming_switch_77665544_power"],
"event_channels": [6, 8],
"manufacturer": "OSRAM",
"model": "LIGHTIFY Dimming Switch",
@ -1593,7 +1580,6 @@ DEVICES = [
}
},
"entities": [
"binary_sensor.securifi_ltd_unk_model_77665544_on_off",
"sensor.securifi_ltd_unk_model_77665544_electrical_measurement",
"sensor.securifi_ltd_unk_model_77665544_power",
"switch.securifi_ltd_unk_model_77665544_on_off",
@ -1643,7 +1629,6 @@ DEVICES = [
"sensor.sercomm_corp_sz_esw01_77665544_power",
"sensor.sercomm_corp_sz_esw01_77665544_power_2",
"sensor.sercomm_corp_sz_esw01_77665544_electrical_measurement",
"switch.sercomm_corp_sz_esw01_77665544_on_off",
"light.sercomm_corp_sz_esw01_77665544_on_off",
],
"event_channels": [6],