Skip to content

Conversation

DarkByteZero
Copy link

first fix for Mi Flora Max

first fix for Mi Flora Max
@DarkByteZero DarkByteZero changed the title Fix for Firmare 3.6.6 Mi Flora Max Fix for Firmware 3.6.6 Mi Flora Max Aug 8, 2022
@DarkByteZero
Copy link
Author

Fixes #171

datetime.now() - self._cache_timeout + timedelta(seconds=300)
)
return
time.sleep(1) # without this, the previous write_handle is done after we read the data
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a poor fix, I know that. But I don't really know much about Python or the Bluethooth libaray. It should be checked whether the handle has already been written.

# With this cleaning, the cache is always empty.

#if self._firmware_version >= "2.6.6":
# if sum(self._cache[10:]) == 0:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are the bytes 11-16 important?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant