From 3e77571b4038d51df336326d40db49e4d1a69713 Mon Sep 17 00:00:00 2001 From: Alone Date: Sun, 12 Nov 2023 15:03:49 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A3=20add=20support=20for=20xiaomi.con?= =?UTF-8?q?troller.86v1=20(#1390)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- custom_components/xiaomi_miot/core/device_customizes.py | 7 +++++++ custom_components/xiaomi_miot/media_player.py | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/custom_components/xiaomi_miot/core/device_customizes.py b/custom_components/xiaomi_miot/core/device_customizes.py index 28a91d4c9..0c0c757ea 100644 --- a/custom_components/xiaomi_miot/core/device_customizes.py +++ b/custom_components/xiaomi_miot/core/device_customizes.py @@ -1158,6 +1158,13 @@ 'exclude_miot_services': 'iot_linkage,machine_state,flag_bit', 'exclude_miot_properties': 'enhance.timer', }, + 'xiaomi.controller.86v1': { + 'switch_properties': 'mute,sleep_mode,auto_screen_off,auto_screen_brightness,touch_sound,key_name_display', + 'select_properties': 'mode,mibrain_level,mico_level,display_state,wallpaper', + 'number_properties': 'speaker.volume,brightness,theme', + 'button_actions': 'homepage,light', + 'text_actions': 'play_text,execute_text_directive', + }, 'xiaomi.tv.*': { 'auto_cloud': True, 'switch_properties': 'is_on', diff --git a/custom_components/xiaomi_miot/media_player.py b/custom_components/xiaomi_miot/media_player.py index c2a2e3011..f42517378 100644 --- a/custom_components/xiaomi_miot/media_player.py +++ b/custom_components/xiaomi_miot/media_player.py @@ -90,7 +90,9 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info= if 'miir.' in model: entities.append(MiirMediaPlayerEntity(config, srv)) continue - if not srv.mapping() and not srv.get_action('play'): + if model in ['xiaomi.controller.86v1']: + pass + elif not srv.mapping() and not srv.get_action('play'): continue if spec.get_service('television', 'projector', 'tv_box'): entities.append(MitvMediaPlayerEntity(config, srv))