Skip to content

Commit f2d5bf6

Browse files
authored
Move and convert manufacturer and model to tuples (#99)
* move model and manufacturer add endpoints to sig * tuples * lint * bring back centralite motion and fix lutron * clean up centralite * fix mija attributes
1 parent 8c87558 commit f2d5bf6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1486
-1315
lines changed

zhaquirks/aduro/adurolightncc.py

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,29 @@ class AdurolightNCC(CustomDevice):
1919
# device_version=2
2020
# input_clusters=[0, 3, 8, 4096, 64716]
2121
# output_clusters=[3, 4, 6, 8, 4096, 64716]>
22-
1: {
23-
'manufacturer': 'ADUROLIGHT',
24-
'model': 'Adurolight_NCC',
25-
'profile_id': zha.PROFILE_ID,
26-
'device_type': DeviceType.NON_COLOR_CONTROLLER,
27-
'input_clusters': [
28-
Basic.cluster_id,
29-
Identify.cluster_id,
30-
LevelControl.cluster_id,
31-
LightLink.cluster_id,
32-
ADUROLIGHT_CLUSTER_ID
33-
],
34-
'output_clusters': [
35-
Identify.cluster_id,
36-
Groups.cluster_id,
37-
OnOff.cluster_id,
38-
LevelControl.cluster_id,
39-
LightLink.cluster_id,
40-
ADUROLIGHT_CLUSTER_ID
41-
],
22+
'models_info': [
23+
('ADUROLIGHT', 'Adurolight_NCC')
24+
],
25+
'endpoints': {
26+
1: {
27+
'profile_id': zha.PROFILE_ID,
28+
'device_type': DeviceType.NON_COLOR_CONTROLLER,
29+
'input_clusters': [
30+
Basic.cluster_id,
31+
Identify.cluster_id,
32+
LevelControl.cluster_id,
33+
LightLink.cluster_id,
34+
ADUROLIGHT_CLUSTER_ID
35+
],
36+
'output_clusters': [
37+
Identify.cluster_id,
38+
Groups.cluster_id,
39+
OnOff.cluster_id,
40+
LevelControl.cluster_id,
41+
LightLink.cluster_id,
42+
ADUROLIGHT_CLUSTER_ID
43+
],
44+
}
4245
}
4346
}
4447

zhaquirks/centralite/3130.py

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,30 @@ class CentraLite3130(CustomDevice):
1818
# device_version=0
1919
# input_clusters=[0, 1, 3, 32, 1026, 2821]
2020
# output_clusters=[3, 6, 8, 25]>
21-
1: {
22-
'profile_id': zha.PROFILE_ID,
23-
'device_type': zha.DeviceType.LEVEL_CONTROL_SWITCH,
24-
'input_clusters': [
25-
Basic.cluster_id,
26-
PowerConfigurationCluster.cluster_id,
27-
Identify.cluster_id,
28-
PollControl.cluster_id,
29-
TemperatureMeasurement.cluster_id,
30-
DIAGNOSTICS_CLUSTER_ID
31-
],
32-
'output_clusters': [
33-
Identify.cluster_id,
34-
OnOff.cluster_id,
35-
LevelControl.cluster_id,
36-
Ota.cluster_id
37-
],
38-
},
21+
'models_info': [
22+
('OSRAM', 'LIGHTIFY Dimming Switch'),
23+
('CentraLite', '3130')
24+
],
25+
'endpoints': {
26+
1: {
27+
'profile_id': zha.PROFILE_ID,
28+
'device_type': zha.DeviceType.LEVEL_CONTROL_SWITCH,
29+
'input_clusters': [
30+
Basic.cluster_id,
31+
PowerConfigurationCluster.cluster_id,
32+
Identify.cluster_id,
33+
PollControl.cluster_id,
34+
TemperatureMeasurement.cluster_id,
35+
DIAGNOSTICS_CLUSTER_ID
36+
],
37+
'output_clusters': [
38+
Identify.cluster_id,
39+
OnOff.cluster_id,
40+
LevelControl.cluster_id,
41+
Ota.cluster_id
42+
],
43+
},
44+
}
3945
}
4046

4147
replacement = {

zhaquirks/centralite/3300S.py

Lines changed: 41 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -20,40 +20,47 @@ class CentraLite3300S(CustomDevice):
2020
# device_version=0
2121
# input_clusters=[0, 1, 3, 1026, 1280, 32, 2821]
2222
# output_clusters=[25]>
23-
1: {
24-
'profile_id': zha.PROFILE_ID,
25-
'device_type': zha.DeviceType.IAS_ZONE,
26-
'input_clusters': [
27-
Basic.cluster_id,
28-
PowerConfigurationCluster.cluster_id,
29-
Identify.cluster_id,
30-
PollControl.cluster_id,
31-
TemperatureMeasurement.cluster_id,
32-
IasZone.cluster_id,
33-
DIAGNOSTICS_CLUSTER_ID
34-
],
35-
'output_clusters': [
36-
Ota.cluster_id
37-
],
38-
},
39-
# <SimpleDescriptor endpoint=2 profile=49887 device_type=12
40-
# device_version=0
41-
# input_clusters=[0, 1, 3, 15, 2821]
42-
# output_clusters=[3]>
43-
2: {
44-
'profile_id': MANUFACTURER_SPECIFIC_PROFILE_ID,
45-
'device_type': zha.DeviceType.SIMPLE_SENSOR,
46-
'input_clusters': [
47-
Basic.cluster_id,
48-
PowerConfigurationCluster.cluster_id,
49-
Identify.cluster_id,
50-
BinaryInput.cluster_id,
51-
DIAGNOSTICS_CLUSTER_ID
52-
],
53-
'output_clusters': [
54-
Identify.cluster_id
55-
],
56-
},
23+
'models_info': [
24+
('CentraLite', '3300'),
25+
('CentraLite', '3300-S'),
26+
('CentraLite', '3323-G')
27+
],
28+
'endpoints': {
29+
1: {
30+
'profile_id': zha.PROFILE_ID,
31+
'device_type': zha.DeviceType.IAS_ZONE,
32+
'input_clusters': [
33+
Basic.cluster_id,
34+
PowerConfigurationCluster.cluster_id,
35+
Identify.cluster_id,
36+
PollControl.cluster_id,
37+
TemperatureMeasurement.cluster_id,
38+
IasZone.cluster_id,
39+
DIAGNOSTICS_CLUSTER_ID
40+
],
41+
'output_clusters': [
42+
Ota.cluster_id
43+
],
44+
},
45+
# <SimpleDescriptor endpoint=2 profile=49887 device_type=12
46+
# device_version=0
47+
# input_clusters=[0, 1, 3, 15, 2821]
48+
# output_clusters=[3]>
49+
2: {
50+
'profile_id': MANUFACTURER_SPECIFIC_PROFILE_ID,
51+
'device_type': zha.DeviceType.SIMPLE_SENSOR,
52+
'input_clusters': [
53+
Basic.cluster_id,
54+
PowerConfigurationCluster.cluster_id,
55+
Identify.cluster_id,
56+
BinaryInput.cluster_id,
57+
DIAGNOSTICS_CLUSTER_ID
58+
],
59+
'output_clusters': [
60+
Identify.cluster_id
61+
],
62+
},
63+
}
5764
}
5865

5966
replacement = {

zhaquirks/centralite/3305S.py

Lines changed: 46 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -19,40 +19,52 @@ class CentraLite3305S(CustomDevice):
1919
# device_version=0
2020
# input_clusters=[0, 1, 3, 1026, 1280, 32, 2821]
2121
# output_clusters=[25]>
22-
1: {
23-
'profile_id': zha.PROFILE_ID,
24-
'device_type': zha.DeviceType.IAS_ZONE,
25-
'input_clusters': [
26-
Basic.cluster_id,
27-
PowerConfigurationCluster.cluster_id,
28-
Identify.cluster_id,
29-
PollControl.cluster_id,
30-
TemperatureMeasurement.cluster_id,
31-
IasZone.cluster_id,
32-
DIAGNOSTICS_CLUSTER_ID
33-
],
34-
'output_clusters': [
35-
Ota.cluster_id
36-
],
37-
},
38-
# <SimpleDescriptor endpoint=2 profile=260 device_type=263
39-
# device_version=0
40-
# input_clusters=[0, 1, 3, 1030, 2821]
41-
# output_clusters=[3]>
42-
2: {
43-
'profile_id': zha.PROFILE_ID,
44-
'device_type': zha.DeviceType.OCCUPANCY_SENSOR,
45-
'input_clusters': [
46-
Basic.cluster_id,
47-
PowerConfigurationCluster.cluster_id,
48-
Identify.cluster_id,
49-
OccupancySensing.cluster_id,
50-
DIAGNOSTICS_CLUSTER_ID
51-
],
52-
'output_clusters': [
53-
Identify.cluster_id
54-
],
55-
},
22+
'models_info': [
23+
('CentraLite', '3305-S'),
24+
('CentraLite', '3325-S'),
25+
('CentraLite', '3305'),
26+
('CentraLite', '3325'),
27+
('CentraLite', '3326'),
28+
('CentraLite', '3326-L'),
29+
('CentraLite', '3328-G'),
30+
('CentraLite', 'Motion Sensor-A')
31+
],
32+
'endpoints': {
33+
1: {
34+
'profile_id': zha.PROFILE_ID,
35+
'device_type': zha.DeviceType.IAS_ZONE,
36+
'input_clusters': [
37+
Basic.cluster_id,
38+
PowerConfigurationCluster.cluster_id,
39+
Identify.cluster_id,
40+
PollControl.cluster_id,
41+
TemperatureMeasurement.cluster_id,
42+
IasZone.cluster_id,
43+
DIAGNOSTICS_CLUSTER_ID
44+
],
45+
'output_clusters': [
46+
Ota.cluster_id
47+
],
48+
},
49+
# <SimpleDescriptor endpoint=2 profile=260 device_type=263
50+
# device_version=0
51+
# input_clusters=[0, 1, 3, 1030, 2821]
52+
# output_clusters=[3]>
53+
2: {
54+
'profile_id': zha.PROFILE_ID,
55+
'device_type': zha.DeviceType.OCCUPANCY_SENSOR,
56+
'input_clusters': [
57+
Basic.cluster_id,
58+
PowerConfigurationCluster.cluster_id,
59+
Identify.cluster_id,
60+
OccupancySensing.cluster_id,
61+
DIAGNOSTICS_CLUSTER_ID
62+
],
63+
'output_clusters': [
64+
Identify.cluster_id
65+
],
66+
},
67+
}
5668
}
5769

5870
replacement = {

zhaquirks/centralite/3310S.py

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -25,26 +25,32 @@ class CentraLite3310S(CustomDevice):
2525
# device_version=0
2626
# input_clusters=[0, 1, 3, 32, 1026, 2821, 64581]
2727
# output_clusters=[3, 25]>
28-
29-
1: {
30-
'manufacturer': 'CentraLite',
31-
'model': '3310-S',
32-
'profile_id': zha.PROFILE_ID,
33-
'device_type': zha.DeviceType.TEMPERATURE_SENSOR,
34-
'input_clusters': [
35-
Basic.cluster_id,
36-
PowerConfigurationCluster.cluster_id,
37-
Identify.cluster_id,
38-
PollControl.cluster_id,
39-
TemperatureMeasurement.cluster_id,
40-
DIAGNOSTICS_CLUSTER_ID,
41-
SmartthingsRelativeHumidityCluster.cluster_id
42-
],
43-
'output_clusters': [
44-
Identify.cluster_id,
45-
Ota.cluster_id
46-
],
47-
},
28+
'manufacturer': 'CentraLite',
29+
'model': '3310-S',
30+
'models_info': [
31+
('CentraLite', '3310-S'),
32+
('CentraLite', '3310-G'),
33+
('CentraLite', '3310')
34+
],
35+
'endpoints': {
36+
1: {
37+
'profile_id': zha.PROFILE_ID,
38+
'device_type': zha.DeviceType.TEMPERATURE_SENSOR,
39+
'input_clusters': [
40+
Basic.cluster_id,
41+
PowerConfigurationCluster.cluster_id,
42+
Identify.cluster_id,
43+
PollControl.cluster_id,
44+
TemperatureMeasurement.cluster_id,
45+
DIAGNOSTICS_CLUSTER_ID,
46+
SmartthingsRelativeHumidityCluster.cluster_id
47+
],
48+
'output_clusters': [
49+
Identify.cluster_id,
50+
Ota.cluster_id
51+
],
52+
},
53+
}
4854
}
4955

5056
replacement = {

0 commit comments

Comments
 (0)