From a803adfa6e95c952f4820af8573b75179641da5f Mon Sep 17 00:00:00 2001 From: Alone Date: Tue, 27 Aug 2024 21:09:46 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=9C=20add=20support=20for=20ainice.sen?= =?UTF-8?q?sor=5Foccupy.bt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xiaomi_miot/core/device_customizes.py | 12 ++++++++++++ .../xiaomi_miot/core/miot_local_devices.py | 1 + 2 files changed, 13 insertions(+) diff --git a/custom_components/xiaomi_miot/core/device_customizes.py b/custom_components/xiaomi_miot/core/device_customizes.py index a7d07148e..7d34e3ea6 100644 --- a/custom_components/xiaomi_miot/core/device_customizes.py +++ b/custom_components/xiaomi_miot/core/device_customizes.py @@ -72,6 +72,18 @@ 'with_properties': 'e_someone_duration,e_noone_duration', 'device_class': 'occupancy', }, + 'ainice.sensor_occupy.bt': { + 'main_miot_services': 'occupancy_sensor', + 'interval_seconds': 10, + 'parallel_updates': 1, + 'switch_properties': 'indicator_switch,bt_pair_switch', + 'select_properties': 'bt_power_level', + 'scanner_properties': 'online_status', + 'select_actions': 'send_magic_package', + }, + 'ainice.sensor_occupy.bt:online_status': { + 'with_properties': 'online_duration,offline_duration,offline_interval,online_mode,bt_capture_mode,binding_info', + }, 'ainice.sensor_occupy.pr': { 'main_miot_services': 'occupancy_sensor', 'state_property': 'occupancy_sensor.occupancy_status', diff --git a/custom_components/xiaomi_miot/core/miot_local_devices.py b/custom_components/xiaomi_miot/core/miot_local_devices.py index 6976ffc6c..beacec419 100644 --- a/custom_components/xiaomi_miot/core/miot_local_devices.py +++ b/custom_components/xiaomi_miot/core/miot_local_devices.py @@ -24,6 +24,7 @@ 'aimore.light.cw3201', 'ainice.motion.bt', 'ainice.sensor_occupy.3b', + 'ainice.sensor_occupy.bt', 'ainice.sensor_occupy.pr', 'airdog.airpurifier.mn', 'ateai.mosq.dakuo',