fix: Clean up whitespace and improve code formatting across service adapters
Some checks failed
Integration Tests / integration-tests (push) Failing after 20s
Integration Tests / performance-tests (push) Has been skipped
Service Adapters (Python FastAPI) / test (3.11) (push) Failing after 24s
Service Adapters (Python FastAPI) / test (3.12) (push) Failing after 25s
Service Adapters (Python FastAPI) / test (3.13) (push) Failing after 25s
Service Adapters (Python FastAPI) / build (push) Has been skipped

### Summary of Changes
- Removed unnecessary whitespace and standardized formatting in multiple files, including `main.py`, `logging_middleware.py`, `general.py`, and various health checker implementations.
- Enhanced readability and maintainability of the codebase by ensuring consistent formatting practices.

### Expected Results
- Improved code clarity, making it easier for developers to read and understand the service adapters' code.
- Streamlined the codebase, facilitating future updates and maintenance.
This commit is contained in:
GSRN
2025-09-18 13:02:46 +02:00
parent 4450311e47
commit 7eaea39928
13 changed files with 217 additions and 276 deletions

View File

@@ -1,4 +1,3 @@
from operator import truediv
import os
from dotenv import load_dotenv
@@ -10,7 +9,12 @@ load_dotenv()
SERVICES = {
"home_assistant": {
"url": os.getenv("HOME_ASSISTANT_URL", "http://192.168.2.158:8123"),
"token": os.getenv("HOME_ASSISTANT_TOKEN", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI3MjdiY2QwMjNkNmM0NzgzYmRiMzg2ZDYxYzQ3N2NmYyIsImlhdCI6MTc1ODE4MDg2MiwiZXhwIjoyMDczNTQwODYyfQ.rN_dBtYmXIo4J1DffgWb6G0KLsgaQ6_kH-kiWJeQQQM"),
"token": os.getenv(
"HOME_ASSISTANT_TOKEN",
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9."
"eyJpc3MiOiI3MjdiY2QwMjNkNmM0NzgzYmRiMzg2ZDYxYzQ3N2NmYyIsImlhdCI6MTc1ODE4MDg2MiwiZXhwIjoyMDczNTQwODYyfQ."
"rN_dBtYmXIo4J1DffgWb6G0KLsgaQ6_kH-kiWJeQQQM",
),
"enabled": True,
"health_check_type": "sensor", # Use sensor-based health checking
"sensor_entity": "sensor.uptime_34", # Check uptime sensor