Created
November 29, 2025 13:56
-
-
Save joe42/cf5cf116dd5c46168b76b9051f88e176 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| async def get_scale_users(self): | |
| """ | |
| Fetch the list of users associated with the scale. | |
| """ | |
| # If user_id is already set from authentication, skip the API call | |
| if self.user_id: | |
| _LOGGER.info(f"user_id already available from authentication: {self.user_id}. Skipping scale_users API call.") | |
| # Create a mock user object with the user_id from auth | |
| mock_user = Users( | |
| scale_user_id=None, | |
| user_id=self.user_id, | |
| mac=None, | |
| index=None, | |
| key=None, | |
| method=None | |
| ) | |
| self.users = [mock_user] | |
| return self.users | |
| url = f"{API_SCALE_USERS_URL}?locale=en&app_id=Renpho&terminal_user_session_key={self.token}" | |
| # Perform the API request |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment