Yeedi vacuum MQTT integration for Home Assistant
|
Some checks failed
CI / lint (push) Failing after 26s
Implements the Node-RED Tomschin flow spec (docs/spec/reverse_engineered_spec.yaml) as native Home Assistant entity platforms. Each platform subscribes directly to the deebot_client event bus — no polling, no home-grown auth, no mocked HA base classes. - yeedi/sensor.py: 17 sensors (battery, last cleaning time, charge state, sleep state, water box, last error, clean speed, water level, 3 lifespan, 4 info + 1 static) - yeedi/button.py: 4 buttons (Start, Return to dock, Pause, Find me). MoveBackward is dropped — deebot_client doesn't ship that command. - yeedi/select.py: 2 selects (water level via SetWaterInfo, clean speed via SetFanSpeed) - yeedi/switch.py: 1 switch (do-not-disturb). deebot_client v11 has no DoNotDisturbEnabled event; we map it to ContinuousCleaningEvent as the closest available signal. The switch preserves both the v6 'enable' and v11 'enabled' field names via getattr fallback. Test infrastructure overhaul: - tests/conftest.py: dropped the entire homeassistant mock tree (~250 lines of sys.modules spoofing). Tests now run against the real homeassistant 2025.1 base classes installed in the venv. - tests/_support/test_event_bus.py: a minimal in-test event bus compatible with the deebot_client v11 EventBus surface (subscribe + notify). v11's EventBus requires a Device; the test version is just a pub-sub. - tests/test_polished_entities.py: 14 tests covering all four platforms. Source fixes surfaced by removing the mocks: - yeedi/services.py: pre-existing use of cv.Required / cv.Optional / cv.make_entity_service_schema was removed in HA 2025.1; switched to voluptuous.vol.Schema + vol.Required + vol.Optional. - yeedi/vacuum.py: AddConfigEntryEntitiesCallback was renamed AddEntitiesCallback in HA 2025.1; fixed. Also gated VacuumEntityFeature.CLEAN_AREA on hasattr because that constant was removed in 2025.1. docs/spec/: the 5 spec YAML files copied in from the prior yeedi_awmbuild research so the spec lives where the code does. Test count: 114 passed, 0 failed (was: 105 with mocks, 27 broken without them). |
||
|---|---|---|
| .forgejo/workflows | ||
| docs/spec | ||
| tests | ||
| yeedi | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| requirements.txt | ||