Skip to content

Commit

Permalink
fix: fix unit convert attribute error (#396)
Browse files Browse the repository at this point in the history
  • Loading branch information
topsworld authored Dec 24, 2024
1 parent ea9aa08 commit 0f5da18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/xiaomi_home/miot/miot_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ def unit_convert(self, spec_unit: str) -> Optional[str]:
# pylint: disable=import-outside-toplevel
from homeassistant.const import UnitOfConductivity
unit_map['μS/cm'] = UnitOfConductivity.MICROSIEMENS_PER_CM
except ImportError:
except Exception: # pylint: disable=broad-except
unit_map['μS/cm'] = 'μS/cm'

return unit_map.get(spec_unit, None)
Expand Down

0 comments on commit 0f5da18

Please sign in to comment.