diff --git a/custom_components/xiaomi_miot/config_flow.py b/custom_components/xiaomi_miot/config_flow.py index 2041dccd0..ed403e0c1 100644 --- a/custom_components/xiaomi_miot/config_flow.py +++ b/custom_components/xiaomi_miot/config_flow.py @@ -281,8 +281,8 @@ async def async_step_user(self, user_input=None): } if self.hass.data[DOMAIN].get('entities', {}): actions.update({ + 'customizing_device': 'Customizing device (自定义设备) <推荐>', 'customizing_entity': 'Customizing entity (自定义实体)', - 'customizing_device': 'Customizing device (自定义设备)', }) return self.async_show_form( step_id='user', @@ -386,7 +386,7 @@ async def async_step_cloud_filter(self, user_input=None): async def async_step_customizing(self, user_input=None): tip = '' - via = self.context.get('customizing_via') or 'customizing_entity' + via = self.context.get('customizing_via') or 'customizing_device' self.context['customizing_via'] = via entry = await self.async_set_unique_id(f'{DOMAIN}-customizes') entry_data = copy.deepcopy(dict(entry.data) if entry else {}) @@ -492,6 +492,9 @@ async def async_step_customizing(self, user_input=None): else: tip = f'None entities in `{domain}`' else: + tip = ('⚠️ 自定义实体后续可能会弃用,推荐通过设备型号**自定义设备**。\n' + 'The Customization of entity may be deprecated in the future, ' + 'it is recommended to customize the device through the device model.') schema.update({ vol.Required('domain', default=user_input.get('domain', vol.UNDEFINED)): vol.In(SUPPORTED_DOMAINS), vol.Optional('only_main_entity', default=user_input.get('only_main_entity', True)): cv.boolean,