mirror of
https://github.com/XiaoMi/ha_xiaomi_home.git
synced 2025-04-04 00:35:33 +08:00
fix: remove unused code
This commit is contained in:
parent
5c3e087500
commit
904fbe3f92
@ -591,13 +591,8 @@ class MIoTDevice:
|
|||||||
# Priority: spec_modify.unit > unit_convert > specv2entity.unit
|
# Priority: spec_modify.unit > unit_convert > specv2entity.unit
|
||||||
miot_prop.external_unit = SPEC_PROP_TRANS_MAP['properties'][
|
miot_prop.external_unit = SPEC_PROP_TRANS_MAP['properties'][
|
||||||
prop_name]['unit_of_measurement']
|
prop_name]['unit_of_measurement']
|
||||||
if (
|
# Priority: default.icon when device_class is set > spec_modify.icon
|
||||||
not miot_prop.icon
|
# > icon_convert
|
||||||
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']
|
|
||||||
miot_prop.platform = platform
|
miot_prop.platform = platform
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user