From 81635363b8ba7827b0a136460133f6f24ff18a21 Mon Sep 17 00:00:00 2001 From: Aaron Bach Date: Thu, 18 Jan 2024 08:33:19 -0700 Subject: [PATCH] Properly type HTTPserver port --- ecowitt2mqtt/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ecowitt2mqtt/config.py b/ecowitt2mqtt/config.py index e7fa9dee..d839dfed 100644 --- a/ecowitt2mqtt/config.py +++ b/ecowitt2mqtt/config.py @@ -117,7 +117,7 @@ class Config(BaseModel): # Optional HTTP parameters: endpoint: str = DEFAULT_ENDPOINT - port: int = DEFAULT_PORT + port: Annotated[int, Field(strict=True, ge=1, le=65536)] = DEFAULT_PORT # Optional logging parameters: diagnostics: bool = False