Bonjour,
Avec le poussoir
Xiaomi Aquara switch (zhaquirks.xiaomi.mija.sensor_switch) il existe le clic simple, le double clic et le clic long.
Pour l’instant les infos créées automatiquement « Type » (1::6::event::attribute) et « Event » (1::6::event::click_type) ne remontent rien.
Voici ce que j’ai si ça peut aider:
Informations brut:
{
"ieee": "00:15:8d:00:06:72:56:79",
"nwk": 4351,
"status": 2,
"lqi": "150",
"rssi": "0",
"last_seen": "1613483906.6061454",
"node_descriptor": "02:40:80:37:10:7f:64:00:00:00:64:00:00",
"endpoints": [
{
"id": 1,
"status": 1,
"device_type": 6,
"profile_id": 260,
"manufacturer": null,
"model": "lumi.sensor_switch",
"output_clusters": [
{
"id": 0,
"name": "BasicCluster",
"attributes": []
},
{
"id": 5,
"name": "Scenes",
"attributes": []
},
{
"id": 4,
"name": "Groups",
"attributes": []
},
{
"id": 6,
"name": "On\/Off",
"attributes": [
{
"id": 0,
"name": "on_off",
"value": false
}
]
},
{
"id": 8,
"name": "Level control",
"attributes": []
},
{
"id": 25,
"name": "Ota",
"attributes": []
}
],
"input_clusters": [
{
"id": 3,
"name": "Identify",
"attributes": []
},
{
"id": 0,
"name": "BasicCluster",
"attributes": [
{
"id": 1,
"name": "app_version",
"value": 10
},
{
"id": 5,
"name": "model",
"value": "lumi.sensor_switch"
}
]
},
{
"id": 1,
"name": "Power Configuration",
"attributes": [
{
"id": 32,
"name": "battery_voltage",
"value": 31
},
{
"id": 33,
"name": "battery_percentage_remaining",
"value": 166
}
]
}
]
}
],
"signature": {
"manufacturer": "LUMI",
"model": "lumi.sensor_switch",
"node_desc": {
"byte1": 2,
"byte2": 64,
"mac_capability_flags": 128,
"manufacturer_code": 4151,
"maximum_buffer_size": 127,
"maximum_incoming_transfer_size": 100,
"server_mask": 0,
"maximum_outgoing_transfer_size": 100,
"descriptor_capability_field": 0
},
"endpoints": {
"1": {
"profile_id": 260,
"device_type": 6,
"input_clusters": [
3,
0,
1
],
"output_clusters": [
0,
5,
4,
6,
8,
25
]
}
}
},
"class": "zhaquirks.xiaomi.mija.sensor_switch"
}
Simple clic
[2021-02-16 14:57:09][DEBUG] : {"devices":{"00:15:8d:00:06:72:56:79":{"1":{"6":{"event":{"click":{"value":{"click_type":"single"},"cluster_name":"On\/Off"}},"0":{"value":"False","cluster_name":"On\/Off"}}}}}}
[2021-02-16 14:57:09][DEBUG] : Search event command for 00:15:8d:00:06:72:56:79 logicalId : 1::6::event::click::click_type => single
[2021-02-16 14:57:09][DEBUG] : Search attribut for 00:15:8d:00:06:72:56:79 logicalId : 1::6::0 => False
Double clic
[2021-02-16 14:52:02][DEBUG] : {"devices":{"00:15:8d:00:06:72:56:79":{"1":{"6":{"event":{"click":{"value":{"click_type":"double"},"cluster_name":"On\/Off"}},"32768":{"value":"2","cluster_name":"On\/Off"}}}}}}
[2021-02-16 14:52:02][DEBUG] : Search event command for 00:15:8d:00:06:72:56:79 logicalId : 1::6::event::click::click_type => double
[2021-02-16 14:52:02][DEBUG] : Search attribut for 00:15:8d:00:06:72:56:79 logicalId : 1::6::32768 => 2
Clic long
[2021-02-16 14:56:11][DEBUG] : {"devices":{"00:15:8d:00:06:72:56:79":{"1":{"6":{"event":{"click":{"value":{"click_type":"single"},"cluster_name":"On\/Off"}},"0":{"value":"True","cluster_name":"On\/Off"}}}}}}
[2021-02-16 14:56:11][DEBUG] : Search event command for 00:15:8d:00:06:72:56:79 logicalId : 1::6::event::click::click_type => single
[2021-02-16 14:56:11][DEBUG] : Search attribut for 00:15:8d:00:06:72:56:79 logicalId : 1::6::0 => True
[2021-02-16 14:56:15][DEBUG] : {"devices":{"00:15:8d:00:06:72:56:79":{"1":{"6":[{"value":"False","cluster_name":"On\/Off"}]}}}}
[2021-02-16 14:56:15][DEBUG] : Search attribut for 00:15:8d:00:06:72:56:79 logicalId : 1::6::0 => False
PS: c’est la première fois que j’essaie d’apporter ma pierre à cet édifice, j’espère ne pas mal faire et/ou faire mieux la prochaine fois