A custom integration providing real-time control and monitoring of Moodo devices via WebSocket and REST API
Moodo is a smart aroma diffuser that allows you to create custom scent combinations using up to 4 interchangeable fragrance capsules. With adjustable fan speeds and multiple modes, Moodo provides personalized aromatherapy for your home, controllable through various smart home platforms.
You can install this integration via HACS or manually.
- Open HACS in your Home Assistant instance
- Click on the three dots menu in the top right corner
- Select Custom repositories
- Add this repository URL:
https://github.com/deanlongstaff/home-assistant-moodo-integration - Select category: Integration
- Click Add
- Close the custom repositories dialog
- Search for "Moodo" in HACS
- Click Download
- Restart Home Assistant
Configure the integration via the integrations page or press the blue button below:
Copy the custom_components/moodo to your custom_components folder and reboot Home Assistant. Configure the Moodo integration either via the integrations page or press the blue button below.
This integration provides comprehensive control over your Moodo devices through multiple Home Assistant platforms:
- Power On/Off: Turn your Moodo device on or off
- Fan Speed Control: Adjust fan intensity from 1-100%
- Diffuser Mode: Standard aromatherapy diffusion
- Purifier Mode: Air purification functionality (requires Moodo AIR capsules and compatible device)
- Shuffle Mode: Automatically rotate between different scent presets
- Interval Mode: Schedule timed diffusion intervals with work/sleep cycles
- Interval Types: Choose from three interval patterns:
- Powerful (10 min on / 5 min off) - Maximum fragrance intensity
- Efficient (10 min on / 10 min off) - Balanced performance and capsule longevity
- Saver (5 min on / 10 min off) - Extended capsule life with gentle diffusion
- Four Scent Slots: Control each of the 4 fragrance capsule slots independently
- Per-Slot Intensity: Adjust the intensity (0-100%) for each slot
- Custom Blending: Create unlimited scent combinations by mixing slots at different levels
- Device Status: Monitor online/offline status
- Capsule Levels: Monitor remaining capsule life
- Battery Level: Track battery percentage
Enter your Moodo account credentials when prompted:
- Email: Your Moodo account email
- Password: Your Moodo account password
The integration will automatically discover all Moodo devices associated with your account.
For each Moodo device, the following entities are created:
fan.<device_name>- Main device control with speed adjustment
switch.<device_name>_shuffle- Enable/disable shuffle modeswitch.<device_name>_interval- Enable/disable interval mode
select.<device_name>_mode- Choose between diffuser and purifier modesselect.<device_name>_preset- Select a preset scent profile. Available options depend on the inserted capsulesselect.<device_name>_interval_type- Select interval timing pattern (when interval mode is enabled)
number.<device_name>_capsule_1_intensity- Capsule 1 intensity control (0-100%)number.<device_name>_capsule_2_intensity- Capsule 2 intensity control (0-100%)number.<device_name>_capsule_3_intensity- Capsule 3 intensity control (0-100%)number.<device_name>_capsule_4_intensity- Capsule 4 intensity control (0-100%)
sensor.<device_name>_battery- Battery level percentagesensor.<device_name>_charging_status- Battery charging statussensor.<device_name>_adapter_status- The power adapter statussensor.<device_name>__active_preset- The active scent presetsensor.<device_name>_capsule_1_type- The type of the capsule inserted in slot 1sensor.<device_name>_capsule_2_type- The type of the capsule inserted in slot 2sensor.<device_name>_capsule_3_type- The type of the capsule inserted in slot 3sensor.<device_name>_capsule_4_type- The type of the capsule inserted in slot 4sensor.<device_name>_capsule_1_remaining- The remaining life of the capsule in slot 1sensor.<device_name>_capsule_2_remaining- The remaining life of the capsule in slot 2sensor.<device_name>_capsule_3_remaining- The remaining life of the capsule in slot 3sensor.<device_name>_capsule_4_remaining- The remaining life of the capsule in slot 4
- Check that your Moodo device is powered on and connected to Wi-Fi
- Verify your Moodo account credentials are correct
- Restart the integration from the Integrations page
- Try restarting your Moodo device
- Try reloading the integration
Unfortunately the Moodo API isn't the most performant, so you may encounter some delays if performing too many actions at once.
- Ensure your Moodo account credentials are up to date
If the capsule slots appear in a different order than expected, this is due to Moodo's device orientation design. You can change which side of your device is considered the "front" in the official Moodo mobile app:
- Open the Moodo mobile app
- Select the Profile tab (far right)
- Tap on My devices
- Tap on your Moodo device's name
- Tap on either arrow near the device image to rotate the orientation
- Return to the main page
The capsule order in Home Assistant will match the orientation set in the Moodo app.
This integration includes comprehensive unit tests. To run them:
-
Install test dependencies:
pip install -r requirements.txt pip install -r requirements_test.txt
-
Run all tests:
pytest tests/
-
Run specific test file:
pytest tests/test_switch.py
-
Run with verbose output:
pytest tests/ -v
-
Run with coverage report:
pytest tests/ --cov=custom_components.moodo --cov-report=term-missing
The test suite covers:
- Integration setup and configuration
- API client functionality
- Data coordinator updates and WebSocket handling
- Switch platform (shuffle and interval modes)
- Sensor platform (device status, battery, capsules)
- Fan platform (power and speed control)
- Select platform (mode, preset, interval type)
- Number platform (capsule intensity control)
- Error handling and edge cases
For issues, feature requests, or contributions, please visit the GitHub repository.
Developed by @deanlongstaff
This is a custom integration provided free for use with Home Assistant and Moodo devices. This project is not affiliated with, endorsed by, or connected to Moodoin any way. All product names, logos, and brands are property of their respective owners.