![]() |
ThalamOS
a powerful Flask web application designed to enhance your storage management.
|
Functions | |
| Annotated[float, "weight in grams"] | get_weight () |
Variables | |
| Annotated | ENV_PATH |
| dotenv_path | |
| Annotated | SCALE_HOST |
wifiscalemanager.py
This module provides functionality to interact with a WiFi-enabled scale.
It retrieves the weight from the scale by sending a GET request to the specified API endpoint.
Functions:
get_weight(): Retrieves the weight of the scale.
Environment Variables:
SCALE_HOST: The hostname or IP address of the WiFi scale, loaded from a .env file.
Dependencies:
- requests: To send HTTP requests.
- os: To handle file paths and environment variables.
- dotenv: To load environment variables from a .env file.
| Annotated[float, "weight in grams"] weigh_fi_manager.get_weight | ( | ) |
Retrieve the weight of the scale.
This function sends a GET request to the specified API endpoint
to retrieve the weight of the scale.
Returns:
float: The weight of the scale.
Definition at line 37 of file weigh_fi_manager.py.
| weigh_fi_manager.dotenv_path |
Definition at line 29 of file weigh_fi_manager.py.
| Annotated weigh_fi_manager.ENV_PATH |
Definition at line 26 of file weigh_fi_manager.py.
| Annotated weigh_fi_manager.SCALE_HOST |
Definition at line 31 of file weigh_fi_manager.py.