From 904fbe3f9207568e680b03078a1d998b1c60531c Mon Sep 17 00:00:00 2001 From: LiShuzhen Date: Wed, 12 Mar 2025 15:10:14 +0800 Subject: [PATCH] fix: remove unused code --- custom_components/xiaomi_home/miot/miot_device.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/custom_components/xiaomi_home/miot/miot_device.py b/custom_components/xiaomi_home/miot/miot_device.py index b91be48..13bc68b 100644 --- a/custom_components/xiaomi_home/miot/miot_device.py +++ b/custom_components/xiaomi_home/miot/miot_device.py @@ -591,13 +591,8 @@ class MIoTDevice: # Priority: spec_modify.unit > unit_convert > specv2entity.unit miot_prop.external_unit = SPEC_PROP_TRANS_MAP['properties'][ prop_name]['unit_of_measurement'] - if ( - not miot_prop.icon - and 'icon' in SPEC_PROP_TRANS_MAP['properties'][prop_name] - ): - # Priority: spec_modify.icon > icon_convert > specv2entity.icon - miot_prop.icon = SPEC_PROP_TRANS_MAP['properties'][prop_name][ - 'icon'] + # Priority: default.icon when device_class is set > spec_modify.icon + # > icon_convert miot_prop.platform = platform return True