Skip to content

Commit

Permalink
🏃 add support for ainice.sensor_occupy.3b
Browse files Browse the repository at this point in the history
  • Loading branch information
al-one committed Mar 5, 2024
1 parent 184d899 commit 985d811
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
10 changes: 10 additions & 0 deletions custom_components/xiaomi_miot/core/device_customizes.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@
'number_properties': 'offline_timeout,motion_timeout,online_level,offline_level,online_duration,'
'offline_duration,ble_in_threshold,ble_out_threshold,ble_far_timeout',
},
'ainice.sensor_occupy.3b': {
'main_miot_services': 'occupancy_sensor',
'state_property': 'occupancy_sensor.current_objects',
'interval_seconds': 10,
'sensor_properties': 'total_objects,a_objects,b_objects,c_objects,d_objects,e_objects',
'switch_properties': 'radar_switch,count_switch',
'select_properties': 'map_index,traction',
'number_properties': 'radar_duration',
'button_actions': 'reboot',
},
'ainice.sensor_occupy.pr': {
'main_miot_services': 'occupancy_sensor',
'state_property': 'occupancy_sensor.occupancy_status',
Expand Down
1 change: 1 addition & 0 deletions custom_components/xiaomi_miot/core/miot_local_devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
'adp.fitting.adgw',
'aimore.light.cw3201',
'ainice.motion.bt',
'ainice.sensor_occupy.3b',
'ainice.sensor_occupy.pr',
'airdog.airpurifier.mn',
'ateai.mosq.dakuo',
Expand Down
34 changes: 34 additions & 0 deletions custom_components/xiaomi_miot/core/miot_specs_extend.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,40 @@
]
}
],
"ainice.sensor_occupy.3b": [
{
"iid": 2,
"properties": [
{
"iid": 1,
"type": "urn:miot-spec-v2:property:current-objects",
"description": "Current Objects",
"value-range": [0, 5, 1],
"value-list": []
},
{"iid": 2, "type": "urn:miot-spec-v2:property:total-objects", "description": "Total Objects"},
{"iid": 5, "type": "urn:miot-spec-v2:property:a-objects", "description": "A Objects"},
{"iid": 6, "type": "urn:miot-spec-v2:property:a-someone-duration", "description": "A Someone Duration"},
{"iid": 7, "type": "urn:miot-spec-v2:property:a-noone-duration", "description": "A Noone Duration"},
{"iid": 8, "type": "urn:miot-spec-v2:property:b-objects", "description": "B Objects"},
{"iid": 9, "type": "urn:miot-spec-v2:property:b-someone-duration", "description": "B Someone Duration"},
{"iid": 10, "type": "urn:miot-spec-v2:property:b-noone-duration", "description": "B Noone Duration"},
{"iid": 11, "type": "urn:miot-spec-v2:property:c-objects", "description": "C Objects"},
{"iid": 12, "type": "urn:miot-spec-v2:property:c-someone-duration", "description": "C Someone Duration"},
{"iid": 13, "type": "urn:miot-spec-v2:property:c-noone-duration", "description": "C Noone Duration"},
{"iid": 14, "type": "urn:miot-spec-v2:property:d-objects", "description": "D Objects"},
{"iid": 15, "type": "urn:miot-spec-v2:property:d-someone-duration", "description": "D Someone Duration"},
{"iid": 16, "type": "urn:miot-spec-v2:property:d-noone-duration", "description": "D Noone Duration"},
{"iid": 17, "type": "urn:miot-spec-v2:property:e-objects", "description": "E Objects"},
{"iid": 18, "type": "urn:miot-spec-v2:property:e-someone-duration", "description": "E Someone Duration"},
{"iid": 19, "type": "urn:miot-spec-v2:property:e-noone-duration", "description": "E Noone Duration"}
]
},
{
"iid": 3,
"description": "Indicator Light"
}
],

"chuangmi.plug.hmi208": [
{
Expand Down

0 comments on commit 985d811

Please sign in to comment.