Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow configuring/reordering the band display #63

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

grimsteel
Copy link

@grimsteel grimsteel commented Apr 17, 2023

First, I wanted to let you know how helpful this library has been to me! The work you (and the many other people involved in this Mi Band community) have done is really amazing.

This allows configuring what items show on the band display

Usage:

from constants import DISPLAY_ITEMS

band.setBandDisplay(DISPLAY_ITEMS.ALL_ITEMS) # Show every item except MI Home
band.setBandDisplay([DISPLAY_ITEMS.WORKOUT, DISPLAY_ITEMS.STATUS, DISPLAY_ITEMS.MORE, DISPLAY_ITEMS.HEART_RATE]) # Display those items in that order

miband4/constants.py

Lines 108 to 114 in 97e1367

STATUS = 0x01
HEART_RATE = 0x02
WORKOUT = 0x03
WEATHER = 0x04
MI_HOME = 0x05 # I have no clue what this does. Pressing it does nothing for me
NOTIFICATIONS = 0x06
MORE = 0x07 # While the app doesn't allow you to remove this, I tried and it works perfectly

When I was looking at the BT Packets, I noticed that the app was always skipping over the display item with ID 5. When I tried making that display item visible, I got something called "Mi Home". Maybe that's a HA thing they have that's not there by default.

I'm working on adding weather support!

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