Mi Scale V1 outputs old value after HA restart
See original GitHub issueThere is a little problem with the output of the integration which is, i think, related to the restore_state
somewhere here https://github.com/custom-components/ble_monitor/issues/292#issuecomment-820149472
When HA is restarted the integration outputs three values when i step on the scale. One as soon as the scale “connects” and then two afterwards after measuring is finished (display stops blinking). The first is the old value which was “saved” for the restore_state. The following two values are the correct ones which are shown on the scale display. From this moment on the integration outputs only two values as soon as the scale display stops blinking after i step on it. This works perfect until HA is rebooted.
As a sidenote: One value is send when the display stops blinking and resend when i step off the scale. Could one of them be omitted on integration level? The “step off” value is useless and i have to drop it manually every time.
Issue Analytics
- State:
- Created 2 years ago
- Comments:52
What I tried to explain is that if a user has a scale that is 3 rooms further, with bad RSSI, it might have missed the message at 22:30:58. In that case, it has a second change of getting the weight from the message at 22:31:01. This isn’t an incorrect weight (it is also 87.8 kg). This message is saying, the last stabilized weight was 87.8 kg and at the moment, there is nobody on the scale.
If that is the case, than I agree with your change. But we need to verify.
We can verify by adding another log line in the file at line 180 behind packet_id. At this point there hasn’t been any filtering.
Hmm, I have to dive into this, its indeed strange that it only happens after a restart and not after 24 h. I don’t have a quick answer, will look into it later.