Skip to content

pymitsubishi/homeassistant-mitsubishi

Repository files navigation

Home Assistant Mitsubishi Air Conditioner Integration

CI HACS Custom GitHub Release Test Coverage License: MIT

A Home Assistant custom component for controlling and monitoring Mitsubishi MAC-577IF-2E air conditioners.

CI/CD

This repository uses GitHub Actions for continuous integration:

  • Python Versions: 3.12, 3.13
  • Tests: Runs pytest with coverage and enforces a 100% code coverage threshold.
  • Lint and Format: Uses ruff for linting and formatting.
  • Type Checking: Uses mypy for static type checking.
  • Pre-commit Hooks: Runs a series of code quality checks on each commit.
  • Manifest Validation: Checks Home Assistant manifest for required fields.

Check the .github/workflows/ci.yml file for more details.

To run tests locally:

git clone https://github.com/pymitsubishi/homeassistant-mitsubishi
cd homeassistant-mitsubishi
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
pytest tests --cov=custom_components/mitsubishi --cov-report=term-missing -v

Features

  • Easy Setup: Configure through Home Assistant UI with automatic device discovery
  • Climate Control: Full climate entity support with temperature, mode, and fan control
  • Sensors: Temperature sensors for room and outdoor readings
  • Capability Detection: Automatic detection of device capabilities using ProfileCode analysis
  • Real-time Updates: Efficient polling with 30-second update intervals

Installation

Install using HACS (recommended)

If you do not have HACS installed yet visit https://hacs.xyz for installation instructions.

To add the this repository to HACS in your Home Assistant instance, use this My button:

Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

After installation, please restart Home Assistant. To add Mitsubishi Air Conditioner to your Home Assistant instance, use this My button:

Open your Home Assistant instance and start setting up a new integration.

Manual configuration steps

Semi-Manual Installation with HACS

  1. In Home Assistant go to HACS integrations section.
  2. Click on the 3 dots in the top right corner.
  3. Select "Custom repositories".
  4. Add the URL (https://github.com/pymitsubishi/homeassistant-mitsubishi) to the repository.
  5. Select the integration category.
  6. Click the "ADD" button.
  7. Now you are able to download the integration.

Manual Installation

  1. Download the latest release of homeassistant-mitsubishi and extract its contents.
  2. Copy the mitsubishi folder into the custom_components directory located typically at /config/custom_components/ in your Home Assistant directory.
  3. Restart Home Assistant to recognize the newly added custom component.
    Open your Home Assistant instance and show your service developer tools with a specific action selected.

Configuration

  1. Go to Configuration → Integrations
  2. Click "Add Integration"
  3. Search for "Mitsubishi Air Conditioner"
  4. Enter your air conditioner's IP address
  5. Optionally enable capability detection (recommended)
  6. Click "Submit"

The integration will automatically discover your device and create the appropriate entities.

Supported Entities

Climate

  • Power: Turn the air conditioner on/off
  • Temperature: Set target temperature (16-32°C)
  • Mode: Heat, Cool, Auto, Dry, Fan
  • Fan Speed: Auto, 1-3, Full
  • Vane Direction: Vertical and horizontal vane control

Sensors

  • Room Temperature: Current room temperature
  • Outdoor Temperature: Outside temperature (if available)
  • Error Status: Device error codes and abnormal states
  • Dehumidifier Level: Current dehumidifier setting percentage

Diagnostic Sensors

  • Unit Information: Complete device model and configuration details
  • Firmware Version: WiFi adapter firmware and version information
  • Unit Type: Air conditioner type and manufacturing details
  • WiFi Information: Signal strength and communication status

Requirements

  • Home Assistant 2025.1 or later (requires Python 3.12+)
  • pymitsubishi library (automatically installed)
  • Mitsubishi air conditioner with MAC-577IF-2E WiFi adapter

Troubleshooting

Connection Issues

  • Ensure your air conditioner is connected to your WiFi network
  • Verify the IP address is correct and accessible from Home Assistant
  • Check firewall settings if connection fails

Missing Features

  • Some features may not be available depending on your specific model
  • Enable capability detection to automatically discover supported features

Development

This integration uses the pymitsubishi library for device communication.

Local Development Setup

  1. Clone this repository
  2. Create a symbolic link in your Home Assistant custom_components directory
  3. Restart Home Assistant
  4. Enable logging for debugging:
logger:
  default: info
  logs:
    custom_components.mitsubishi: debug
    pymitsubishi: debug

Contributing

Contributions are welcome! Please see our Contributing Guidelines for detailed information on:

  • Development setup
  • Code quality standards
  • Testing requirements
  • Commit message conventions
  • Pull request process

Quick start:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feat/amazing-feature)
  3. Make your changes following our guidelines
  4. Run tests (pytest tests/)
  5. Submit a pull request

License

MIT License - see LICENSE file for details.

Support

About

Home Assistant custom component for Mitsubishi air conditioners

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors