fix: Windows event loop compatibility, EMQX API response handling, and test fix

- Add WindowsSelectorEventLoopPolicy for paho-mqtt on Windows
- Handle EMQX /status plain text and /metrics list responses
- Fix test_default_settings to ignore .env file
- Add __main__.py for python -m mqtt_home support

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
walkpan
2026-03-29 21:52:20 +08:00
parent bac099c805
commit c4d35be54d
5 changed files with 29 additions and 3 deletions

View File

@@ -3,7 +3,7 @@ from mqtt_home.config import Settings
def test_default_settings():
s = Settings()
s = Settings(_env_file=None)
assert s.mqtt_host == "localhost"
assert s.mqtt_port == 1883
assert s.web_port == 8000