This is a platform to support Fujitsu General Airconditioners under Climate component of Home Assistant. The Python supporting library for accessing the FGLair™ API is located at: https://github.com/bigmoby/pyfujitsugeneral/
-
Create this directory path
custom_components/fglair_heatpump_controller/if it does not already exist. -
Download the all
custom_components/fglair_heatpump_controller/files from the repo and place it in the directory mentioned in previous step.
- Add this repository to HACS:
https://github.com/bigmoby/fglair_for_homeassistant
-
Search for the
FGLair integration for homeassistantintegration and choose install. -
Reboot Home Assistant.
In Home Assistant->Settings->Device & services->Integration menu add the new integration FGLair and configure it.
Please, use your FGLair app username/password and region your FGLair account is registered (choose one of region: eu, cn or us). For tokenpath field you could leave the default value token.txt. You could set a proper temperature_offset, default will be 0.
Attention: please, remove from configuration.yaml any previous FGLair installation setup.
- HVAC Modes: Heat, Cool, Auto, Dry, Fan Only, Off
- Fan Speeds: Auto, Low, Medium, High, Quiet
- Preset Modes: Economy, Boost, Away (Min Heat)
- Temperature Control: Adjustable target temperature with offset support
- Vertical Swing: Full vertical swing control with position settings
- Horizontal Swing: Independent horizontal swing control (requires Home Assistant 2024.12+ and compatible air conditioner)
Setup the development environment:
make setupOr manually:
./scripts/setupUse the Makefile for common development tasks:
make help # Show all available commands
make setup # Setup development environment (run this first!)
make test # Run tests
make test-coverage # Run tests with coverage report
make lint # Run linting tools
make format # Format code
make check # Run all checks (lint + test)
make clean # Clean up temporary files
make install-dev # Install in development mode
make develop # Start development server (requires setup first)
make ci # Run CI pipeline locally
# Pre-commit system
make pre-commit-install # Install pre-commit hooks
make pre-commit-uninstall # Uninstall pre-commit hooks
make pre-commit-run # Run pre-commit on all filesNote: Make sure you have run make setup before using make develop, otherwise you may get an error because the hass command will not be available.
This project includes development tools for code quality and testing:
Install pre-commit hooks to automatically run checks before commits:
make pre-commit-install # Install pre-commit hooksThe pre-commit configuration includes:
- ✅ Code formatting with ruff
- ✅ Linting with ruff and flake8
- ✅ Type checking with mypy
- ✅ Test execution with pytest
- ✅ Coverage checking (minimum 100%)
Activate virtual environment:
source venv/bin/activateRun tests:
python -m pytest tests/ -vRun linting:
pre-commit run --all-filesStart development server:
./scripts/developrequirements.txt- Core runtime dependenciesrequirements.test.txt- Testing and development dependenciespyproject.toml- Project metadata and optional dependencies
The project uses:
- pyfujitsugeneral==2.0.33 - Core API client for FGLair
- aiofiles==24.1.0 - Async file operations
- pytest-homeassistant-custom-component - Testing framework for HA integrations
- ruff - Fast Python linter and formatter
- mypy - Static type checker
- pre-commit - Git hooks for code quality
- Logging needs to be implemented
- The "powerful" functionality is implemented via the preset selections in the UI
- Independent horizontal swing control (Home Assistant 2024.12+)
- There are some other functionalities in the A/C which currently is not implemented.
- Possibility to add external temperature sensor
** "FGLair" is a trademark of FUJITSU GENERAL LIMITED.
