Skip to content

feat: Add Home Assistant smart device integration (Issue #366)#2435

Open
Wanbogang wants to merge 1 commit intoOpenMind:mainfrom
Wanbogang:feature/home-assistant-integration
Open

feat: Add Home Assistant smart device integration (Issue #366)#2435
Wanbogang wants to merge 1 commit intoOpenMind:mainfrom
Wanbogang:feature/home-assistant-integration

Conversation

@Wanbogang
Copy link
Collaborator

@Wanbogang Wanbogang commented Mar 1, 2026

Summary

Implements Home Assistant smart device integration, allowing OM1 robots to control smart home devices via Home Assistant. #366

Changes

New: src/actions/home_assistant/

  • interface.py — defines HADeviceType, HAAction, HomeAssistantInput, and shared COLOR_MAP
  • connector/rest_api.py — REST API connector
  • connector/websocket.py — WebSocket connector
  • connector/mqtt.py — MQTT connector

Each connector supports:

  • Light: turn on/off, set brightness, set color
  • Switch: turn on/off
  • Climate: set temperature, turn on/off

New: src/inputs/plugins/home_assistant.py

  • HomeAssistantStateInput plugin for real-time device state monitoring via REST polling

New: config/home_assistant.json5

  • Example configuration file for Home Assistant integration

Updated: pyproject.toml

  • Added aiomqtt==2.5.0 dependency for MQTT connector

- Add home_assistant action with 3 connectors:
  - REST API (rest_api.py)
  - WebSocket (websocket.py)
  - MQTT (mqtt.py)
- Each connector supports:
  - Light (on/off, brightness, color)
  - Switch (on/off)
  - Climate/thermostat (temperature, on/off)
- Add HomeAssistantStateInput plugin for real-time device state monitoring
- Add config/home_assistant.json5 example configuration
- Add aiomqtt==2.5.0 dependency
- Add 125 unit tests, all passing at 100% coverage
- Ruff and pyright clean

Follows OM1 action/input plugin architecture conventions.
@Wanbogang Wanbogang requested review from a team as code owners March 1, 2026 04:25
@github-actions github-actions bot added dependencies Pull requests that update a dependency file robotics Robotics code changes python Python code tests Test files config Configuration files labels Mar 1, 2026
@codecov
Copy link

codecov bot commented Mar 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config Configuration files dependencies Pull requests that update a dependency file python Python code robotics Robotics code changes tests Test files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant