The Xiaomi Home Assistant is a convenient tool for managing and monitoring smart devices, including the Xiaomi Socket. However, some users have encountered discrepancies in the recorded energy consumption. This article aims to explore the possible causes of these discrepancies and provide solutions to ensure accurate recordings. The Xiaomi iOS app and Home Assistant (HA) have been reported to show different energy consumption values for devices connected to the Xiaomi Socket. While the Xiaomi iOS app displays the correct consumption, HA records a significantly higher value. This issue has been investigated, and the cause has been identified as the rounding of float values to integers in the HA integration. The rounding occurs in the `value_format` method in the `miot_spec.py` file, specifically when the property format is defined as an integer in the MIoT specification. To resolve this issue, it is recommended to modify the HA integration to handle float values correctly. This can be achieved by updating the `value_format` method to return the original float value instead of rounding it to an integer. Additionally, users can try updating their HA core version and Xiaomi Home Integration version to the latest available. By taking these steps, users can ensure accurate energy consumption recordings and make the most out of their Xiaomi Home Assistant.