Skip to content
This repository was archived by the owner on Jun 4, 2025. It is now read-only.

Commit 07e3c04

Browse files
committed
Rip out unmaintained dependency_injector; also now mypy checking on all object creation is accurate
1 parent a9179bb commit 07e3c04

File tree

8 files changed

+182
-193
lines changed

8 files changed

+182
-193
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@ __pycache__
22
.direnv
33
result
44
emulator_config.json
5-
config.py
65
.mypy_cache
76
.localenvrc

config.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
from dataclasses import dataclass, field
2+
from typing import Literal
3+
4+
@dataclass
5+
class MQTTConfig:
6+
hostname: str
7+
port: int
8+
username: str
9+
password: str
10+
discovery_prefix: str
11+
discovery_node_id: str
12+
discovery_object_id: str
13+
14+
@dataclass
15+
class LocationConfig:
16+
latitude: float
17+
longitude: float
18+
19+
@dataclass
20+
class AppConfig:
21+
mode: Literal["real"] | Literal["emulated"]
22+
gpio_hardware_mapping: str
23+
gpio_slowdown: int
24+
purpleair_url: str
25+
display_tz: str
26+
calendar_ical_url: str
27+
font_path: str
28+
icon_path: str
29+
mqtt: MQTTConfig
30+
homeassistant_media_mqtt_topic: str | None
31+
location: LocationConfig
32+
weather_mqtt_topic: str

0 commit comments

Comments
 (0)