Repository files navigation

comfoclime

hacs_badgeTests

HomeAssistant integration of Zehnder ComfoClime (and all devices in ComfoNet bus like the ComfoAir Q)

Features

ComfoClime is a HVAC solution as additional device for the ComfoAir Q series. It comes with its own app and an propietary JSON API. The ComfoClime unit is connected to the local network via WiFi/WLAN, the API is available only local via HTTP requests without authentication. The integration can also control the ventilation main unit ComfoAir Q. It currently offers:

  • reading the dashboard data similar to the official app
  • climate control entity with HVAC modes (heat/cool/fan_only/off) and preset modes (comfort/boost/eco)
  • scenario modes (cooking, party, away, boost) for special operating situations
  • reading and writing the active temperature profile
  • setting the ventilation fan speed
  • autodiscovering all connected devices
  • property (r/w) and telemetry (r/o) values of all connected devices
  • service calls for setting properties, restarting the system, and activating scenario modes
  • configuration via config flow by host/ip
  • locales in english and german

Requirements

System Requirements

  • Home Assistant: ≥ 2026.5.0
  • Python: ≥ 3.14
  • aiohttp: ≥ 3.8.0, < 4.0
  • pydantic: ≥ 2.0.0

Supported Devices

  • Zehnder ComfoClime
  • Zehnder ComfoAir Q (ComfoNet Bus)
  • Other compatible ComfoNet devices

Developer Setup

  • Clone this repository or open it in a Codespace/Dev Container as described below
  • Install dependencies and set up the development environment
  • Home Assistant (2026.5.0+) and the integration will be available for local development and testing
  • Home Assistant runs automatically on port 8123.
  • See .devcontainer/README.md for detailed instructions.

Python Version Requirements

This integration requires Python 3.14.2 or newer: Home Assistant 2026.3+ declares Requires-Python >= 3.14.2, so an older 3.14 (including release candidates) silently resolves to Home Assistant 2026.2.x and the integration will fail to import. The Dev Container provides a compatible environment.

The source also uses PEP 758 unparenthesised except A, B: clauses, which ruff format produces because the project targets py314. On Python 3.13 or older these are a SyntaxError — that means the interpreter is too old, not that the file is broken. Do not add the parentheses back; the formatter removes them again.

📚 Documentation

All developer/AI-agent documentation (architecture, coding conventions, byte-decoding rules, entity categorization, scenario modes, services, troubleshooting) lives in a single place:

  • CLAUDE.md - the canonical technical reference for this repository

For the full, upstream reverse-engineered API/protocol reference, see:

Feel free to extend!

Development & Testing

Want to test or develop this integration? Use the included GitHub Codespace or Dev Container setup!

🚀 Quick Start:

  • Click "Code" → "Codespaces" → "Create codespace" on GitHub
  • Or open in VS Code with Dev Containers extension
  • Home Assistant runs automatically on port 8123
  • See .devcontainer/README.md for detailed instructions

This provides a complete Home Assistant development environment with debugging support.

Installation

  • add this repository via HACS (user defined repositories, URL: https://github.com/Revilo91/comfoclime)
  • install the "Zehnder ComfoClime" integration in HACS
  • restart Home Assistant
  • add the ComfoClime device (connected devices like the ComfoAir Q are detected and added automatically)

Choosing which entities you see

The integration creates every entity it knows about for the devices it finds, and lets Home Assistant decide what is shown. Everyday values — temperatures, air flows, fan speed, the climate and fan entities, the comfort controls — are enabled straight away. Configuration and diagnostic entities (heating and cooling curve parameters, raw telemetry, API access counters) are created but disabled, so a fresh install is not flooded with a hundred entities.

To turn something on or off, go to Settings → Devices & services → ComfoClime, open the device, and use the entity's own enable/disable toggle. Disabled entities are not polled at all, so switching off the ones you don't need genuinely reduces the load on the device.

Missing a sensor you expected? Check the "+N entities disabled" link on the device page before opening an issue — it is almost always sitting there, disabled by default.

The integration's options dialog only holds connection tuning: timeouts, polling interval and caching, and request rate limiting. Raise the rate limiting values if you see timeouts or entities going unavailable; the ComfoClime's Airduino board is easily overwhelmed.

Climate Control Features

The integration provides a comprehensive climate control entity that unifies all temperature and ventilation control features:

HVAC Modes

  • Off: System standby mode
  • Heat: Heating mode (automatically sets season to heating)
  • Cool: Cooling mode (automatically sets season to cooling)
  • Fan Only: Ventilation only mode (season set to transition)

Preset Modes

  • Manual (none): Manual temperature control mode
  • Comfort: Maximum comfort temperature profile
  • Boost: Power saving temperature profile
  • Eco: Energy efficient temperature profile

Scenario Modes (via service call)

Special operating modes activated through the comfoclime.set_scenario_mode service:

  • Cooking: High ventilation for cooking (default: 30 min)
  • Party: High ventilation for parties (default: 30 min)
  • Away: Reduced mode for vacation (default: 24 hours)
  • Boost: Maximum power boost (default: 30 min)

Temperature Control

  • Set target temperature for heating (15-25°C) and cooling (20-28°C) seasons
  • Current temperature display from indoor sensor
  • Automatic temperature range adjustment based on active season

Smart Season Detection

The climate entity automatically:

  • Detects current season from ComfoClime dashboard
  • Adjusts available temperature ranges accordingly
  • Shows appropriate HVAC actions (heating/cooling/fan/idle)
  • Manages system state based on fan activity

Heat Pump Status Interpretation

The climate entity uses bitwise operations to accurately determine the current HVAC action from the heat pump status code:

  • Bit 1 (0x02): Heating mode flag
  • Bit 2 (0x04): Cooling mode flag

This ensures correct interpretation of all status codes, including transitional states:

Status CodeBinaryHVAC ActionDescription
00000 0000OffHeat pump is off
10000 0001IdleStarting up
30000 0011HeatingActively heating
50000 0101CoolingActively cooling
170001 0001IdleTransitional state
190001 0011HeatingHeating in transitional state
210001 0101CoolingCooling in transitional state
670100 0011HeatingHeating mode (defrosting?)
750100 1011HeatingHeating mode (defrosting + drying?)
830101 0011HeatingHeating mode

Current ToDo / development

There are many more telemetry and property values, that make sense to be offered by the integration. The ComfoClime unit itself is fully integrated but there are some missing sensors, switches and numbers of the ComfoAirQ unit to be added in the future. You are missing one? The definitions are in seperate files in the entities folder, so you can try them yourself. If they are working you can open an issue or directly open a pull request.

Feel free to participate! 🙋‍♂️

Thanks to...

@michaelarnauts and his integration of ComfoConnect, where I discovered a lot of telemetries and properties of the ventilation unit: https://github.com/michaelarnauts/aiocomfoconnect

Development

Releasing a New Version

This project uses automated release workflows that handle everything for you:

Creating a Stable Release

  1. Trigger the release workflow:
    • Go to Actions → Release workflow
    • Click "Run workflow"
    • Enter the version number (e.g., 2.1.0)
    • The workflow will automatically:
  • Update the version in custom_components/comfoclime/manifest.json
  • Update the version in pyproject.toml
    • Create a pull request with the version change
    • Auto-merge the PR (if branch protection allows)
    • Create and push a git tag
    • Generate a changelog from commits since the last tag
    • Create a GitHub release with the changelog

Creating a Pre-Release

Pre-releases are useful for beta testing new features before a stable release:

  1. Trigger the pre-release workflow:
    • Go to Actions → Pre-Release workflow
    • Click "Run workflow"
    • Enter the pre-release version number (e.g., 2.1.0b1)
    • Supported format: X.Y.ZbN
    • The workflow will automatically:
      • Update the version in custom_components/comfoclime/manifest.json
      • Update the version in pyproject.toml
      • Create a pull request with the version change
      • Auto-merge the PR (if branch protection allows)
      • Create and push a git tag
      • Generate a changelog from commits since the last tag
      • Create a GitHub pre-release with warning message

Note: The workflows create PRs for version updates to comply with branch protection rules. If auto-merge is enabled on the repository, the PRs will be merged automatically. Otherwise, you need to manually approve and merge the PR, then the release will be created.

Running Tests

The integration includes a comprehensive test suite covering all entity types. To run the tests:

# Install developer dependencies
uv sync --group dev
# Run all tests
uv run pytest tests/
# Run tests with coverage
uv run pytest tests/ --cov=custom_components/comfoclime --cov-report=html
# Run specific test file
uv run pytest tests/test_sensor.py -v

The test suite includes:

  • Unit tests for all entity types (sensor, switch, select, number, climate, fan)
  • API tests
  • Integration setup tests, including the config entry v1 → v2 migration
  • Conformance checks of the sensor definitions against the upstream protocol documentation (byte counts, signedness and scaling factors), so a wrong decode is caught rather than showing a plausible but wrong number
  • Consistency checks between entity definitions, the config flow and both translation files
  • Mock fixtures for testing without a real device

Tests are automatically run via GitHub Actions on push and pull requests.

Troubleshooting

Having issues with the integration? Check the "Bekannte Fallstricke" section in CLAUDE.md for common issues and solutions, including:

  • GitHub integration timeout errors (not related to ComfoClime)
  • Connection issues with the device
  • Entity update problems
  • Integration loading failures
  • Development environment issues

About

HomeAssistant integration of Zehnder ComfoClime

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Repository files navigation

comfoclime

hacs_badgeTests

HomeAssistant integration of Zehnder ComfoClime (and all devices in ComfoNet bus like the ComfoAir Q)

Features

ComfoClime is a HVAC solution as additional device for the ComfoAir Q series. It comes with its own app and an propietary JSON API. The ComfoClime unit is connected to the local network via WiFi/WLAN, the API is available only local via HTTP requests without authentication. The integration can also control the ventilation main unit ComfoAir Q. It currently offers:

  • reading the dashboard data similar to the official app
  • climate control entity with HVAC modes (heat/cool/fan_only/off) and preset modes (comfort/boost/eco)
  • scenario modes (cooking, party, away, boost) for special operating situations
  • reading and writing the active temperature profile
  • setting the ventilation fan speed
  • autodiscovering all connected devices
  • property (r/w) and telemetry (r/o) values of all connected devices
  • service calls for setting properties, restarting the system, and activating scenario modes
  • configuration via config flow by host/ip
  • locales in english and german

Requirements

System Requirements

  • Home Assistant: ≥ 2026.5.0
  • Python: ≥ 3.14
  • aiohttp: ≥ 3.8.0, < 4.0
  • pydantic: ≥ 2.0.0

Supported Devices

  • Zehnder ComfoClime
  • Zehnder ComfoAir Q (ComfoNet Bus)
  • Other compatible ComfoNet devices

Developer Setup

  • Clone this repository or open it in a Codespace/Dev Container as described below
  • Install dependencies and set up the development environment
  • Home Assistant (2026.5.0+) and the integration will be available for local development and testing
  • Home Assistant runs automatically on port 8123.
  • See .devcontainer/README.md for detailed instructions.

Python Version Requirements

This integration requires Python 3.14.2 or newer: Home Assistant 2026.3+ declares Requires-Python >= 3.14.2, so an older 3.14 (including release candidates) silently resolves to Home Assistant 2026.2.x and the integration will fail to import. The Dev Container provides a compatible environment.

The source also uses PEP 758 unparenthesised except A, B: clauses, which ruff format produces because the project targets py314. On Python 3.13 or older these are a SyntaxError — that means the interpreter is too old, not that the file is broken. Do not add the parentheses back; the formatter removes them again.

📚 Documentation

All developer/AI-agent documentation (architecture, coding conventions, byte-decoding rules, entity categorization, scenario modes, services, troubleshooting) lives in a single place:

  • CLAUDE.md - the canonical technical reference for this repository

For the full, upstream reverse-engineered API/protocol reference, see:

Feel free to extend!

Development & Testing

Want to test or develop this integration? Use the included GitHub Codespace or Dev Container setup!

🚀 Quick Start:

  • Click "Code" → "Codespaces" → "Create codespace" on GitHub
  • Or open in VS Code with Dev Containers extension
  • Home Assistant runs automatically on port 8123
  • See .devcontainer/README.md for detailed instructions

This provides a complete Home Assistant development environment with debugging support.

Installation

  • add this repository via HACS (user defined repositories, URL: https://github.com/Revilo91/comfoclime)
  • install the "Zehnder ComfoClime" integration in HACS
  • restart Home Assistant
  • add the ComfoClime device (connected devices like the ComfoAir Q are detected and added automatically)

Choosing which entities you see

The integration creates every entity it knows about for the devices it finds, and lets Home Assistant decide what is shown. Everyday values — temperatures, air flows, fan speed, the climate and fan entities, the comfort controls — are enabled straight away. Configuration and diagnostic entities (heating and cooling curve parameters, raw telemetry, API access counters) are created but disabled, so a fresh install is not flooded with a hundred entities.

To turn something on or off, go to Settings → Devices & services → ComfoClime, open the device, and use the entity's own enable/disable toggle. Disabled entities are not polled at all, so switching off the ones you don't need genuinely reduces the load on the device.

Missing a sensor you expected? Check the "+N entities disabled" link on the device page before opening an issue — it is almost always sitting there, disabled by default.

The integration's options dialog only holds connection tuning: timeouts, polling interval and caching, and request rate limiting. Raise the rate limiting values if you see timeouts or entities going unavailable; the ComfoClime's Airduino board is easily overwhelmed.

Climate Control Features

The integration provides a comprehensive climate control entity that unifies all temperature and ventilation control features:

HVAC Modes

  • Off: System standby mode
  • Heat: Heating mode (automatically sets season to heating)
  • Cool: Cooling mode (automatically sets season to cooling)
  • Fan Only: Ventilation only mode (season set to transition)

Preset Modes

  • Manual (none): Manual temperature control mode
  • Comfort: Maximum comfort temperature profile
  • Boost: Power saving temperature profile
  • Eco: Energy efficient temperature profile

Scenario Modes (via service call)

Special operating modes activated through the comfoclime.set_scenario_mode service:

  • Cooking: High ventilation for cooking (default: 30 min)
  • Party: High ventilation for parties (default: 30 min)
  • Away: Reduced mode for vacation (default: 24 hours)
  • Boost: Maximum power boost (default: 30 min)

Temperature Control

  • Set target temperature for heating (15-25°C) and cooling (20-28°C) seasons
  • Current temperature display from indoor sensor
  • Automatic temperature range adjustment based on active season

Smart Season Detection

The climate entity automatically:

  • Detects current season from ComfoClime dashboard
  • Adjusts available temperature ranges accordingly
  • Shows appropriate HVAC actions (heating/cooling/fan/idle)
  • Manages system state based on fan activity

Heat Pump Status Interpretation

The climate entity uses bitwise operations to accurately determine the current HVAC action from the heat pump status code:

  • Bit 1 (0x02): Heating mode flag
  • Bit 2 (0x04): Cooling mode flag

This ensures correct interpretation of all status codes, including transitional states:

Status CodeBinaryHVAC ActionDescription
00000 0000OffHeat pump is off
10000 0001IdleStarting up
30000 0011HeatingActively heating
50000 0101CoolingActively cooling
170001 0001IdleTransitional state
190001 0011HeatingHeating in transitional state
210001 0101CoolingCooling in transitional state
670100 0011HeatingHeating mode (defrosting?)
750100 1011HeatingHeating mode (defrosting + drying?)
830101 0011HeatingHeating mode

Current ToDo / development

There are many more telemetry and property values, that make sense to be offered by the integration. The ComfoClime unit itself is fully integrated but there are some missing sensors, switches and numbers of the ComfoAirQ unit to be added in the future. You are missing one? The definitions are in seperate files in the entities folder, so you can try them yourself. If they are working you can open an issue or directly open a pull request.

Feel free to participate! 🙋‍♂️

Thanks to...

@michaelarnauts and his integration of ComfoConnect, where I discovered a lot of telemetries and properties of the ventilation unit: https://github.com/michaelarnauts/aiocomfoconnect

Development

Releasing a New Version

This project uses automated release workflows that handle everything for you:

Creating a Stable Release

  1. Trigger the release workflow:
    • Go to Actions → Release workflow
    • Click "Run workflow"
    • Enter the version number (e.g., 2.1.0)
    • The workflow will automatically:
  • Update the version in custom_components/comfoclime/manifest.json
  • Update the version in pyproject.toml
    • Create a pull request with the version change
    • Auto-merge the PR (if branch protection allows)
    • Create and push a git tag
    • Generate a changelog from commits since the last tag
    • Create a GitHub release with the changelog

Creating a Pre-Release

Pre-releases are useful for beta testing new features before a stable release:

  1. Trigger the pre-release workflow:
    • Go to Actions → Pre-Release workflow
    • Click "Run workflow"
    • Enter the pre-release version number (e.g., 2.1.0b1)
    • Supported format: X.Y.ZbN
    • The workflow will automatically:
      • Update the version in custom_components/comfoclime/manifest.json
      • Update the version in pyproject.toml
      • Create a pull request with the version change
      • Auto-merge the PR (if branch protection allows)
      • Create and push a git tag
      • Generate a changelog from commits since the last tag
      • Create a GitHub pre-release with warning message

Note: The workflows create PRs for version updates to comply with branch protection rules. If auto-merge is enabled on the repository, the PRs will be merged automatically. Otherwise, you need to manually approve and merge the PR, then the release will be created.

Running Tests

The integration includes a comprehensive test suite covering all entity types. To run the tests:

# Install developer dependencies
uv sync --group dev
# Run all tests
uv run pytest tests/
# Run tests with coverage
uv run pytest tests/ --cov=custom_components/comfoclime --cov-report=html
# Run specific test file
uv run pytest tests/test_sensor.py -v

The test suite includes:

  • Unit tests for all entity types (sensor, switch, select, number, climate, fan)
  • API tests
  • Integration setup tests, including the config entry v1 → v2 migration
  • Conformance checks of the sensor definitions against the upstream protocol documentation (byte counts, signedness and scaling factors), so a wrong decode is caught rather than showing a plausible but wrong number
  • Consistency checks between entity definitions, the config flow and both translation files
  • Mock fixtures for testing without a real device

Tests are automatically run via GitHub Actions on push and pull requests.

Troubleshooting

Having issues with the integration? Check the "Bekannte Fallstricke" section in CLAUDE.md for common issues and solutions, including:

  • GitHub integration timeout errors (not related to ComfoClime)
  • Connection issues with the device
  • Entity update problems
  • Integration loading failures
  • Development environment issues

About

HomeAssistant integration of Zehnder ComfoClime

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

comfoclime

hacs_badgeTests

HomeAssistant integration of Zehnder ComfoClime (and all devices in ComfoNet bus like the ComfoAir Q)

Features

ComfoClime is a HVAC solution as additional device for the ComfoAir Q series. It comes with its own app and an propietary JSON API. The ComfoClime unit is connected to the local network via WiFi/WLAN, the API is available only local via HTTP requests without authentication. The integration can also control the ventilation main unit ComfoAir Q. It currently offers:

  • reading the dashboard data similar to the official app
  • climate control entity with HVAC modes (heat/cool/fan_only/off) and preset modes (comfort/boost/eco)
  • scenario modes (cooking, party, away, boost) for special operating situations
  • reading and writing the active temperature profile
  • setting the ventilation fan speed
  • autodiscovering all connected devices
  • property (r/w) and telemetry (r/o) values of all connected devices
  • service calls for setting properties, restarting the system, and activating scenario modes
  • configuration via config flow by host/ip
  • locales in english and german

Requirements

System Requirements

  • Home Assistant: ≥ 2026.5.0
  • Python: ≥ 3.14
  • aiohttp: ≥ 3.8.0, < 4.0
  • pydantic: ≥ 2.0.0

Supported Devices

  • Zehnder ComfoClime
  • Zehnder ComfoAir Q (ComfoNet Bus)
  • Other compatible ComfoNet devices

Developer Setup

  • Clone this repository or open it in a Codespace/Dev Container as described below
  • Install dependencies and set up the development environment
  • Home Assistant (2026.5.0+) and the integration will be available for local development and testing
  • Home Assistant runs automatically on port 8123.
  • See .devcontainer/README.md for detailed instructions.

Python Version Requirements

This integration requires Python 3.14.2 or newer: Home Assistant 2026.3+ declares Requires-Python >= 3.14.2, so an older 3.14 (including release candidates) silently resolves to Home Assistant 2026.2.x and the integration will fail to import. The Dev Container provides a compatible environment.

The source also uses PEP 758 unparenthesised except A, B: clauses, which ruff format produces because the project targets py314. On Python 3.13 or older these are a SyntaxError — that means the interpreter is too old, not that the file is broken. Do not add the parentheses back; the formatter removes them again.

📚 Documentation

All developer/AI-agent documentation (architecture, coding conventions, byte-decoding rules, entity categorization, scenario modes, services, troubleshooting) lives in a single place:

  • CLAUDE.md - the canonical technical reference for this repository

For the full, upstream reverse-engineered API/protocol reference, see:

Feel free to extend!

Development & Testing

Want to test or develop this integration? Use the included GitHub Codespace or Dev Container setup!

🚀 Quick Start:

  • Click "Code" → "Codespaces" → "Create codespace" on GitHub
  • Or open in VS Code with Dev Containers extension
  • Home Assistant runs automatically on port 8123
  • See .devcontainer/README.md for detailed instructions

This provides a complete Home Assistant development environment with debugging support.

Installation

  • add this repository via HACS (user defined repositories, URL: https://github.com/Revilo91/comfoclime)
  • install the "Zehnder ComfoClime" integration in HACS
  • restart Home Assistant
  • add the ComfoClime device (connected devices like the ComfoAir Q are detected and added automatically)

Choosing which entities you see

The integration creates every entity it knows about for the devices it finds, and lets Home Assistant decide what is shown. Everyday values — temperatures, air flows, fan speed, the climate and fan entities, the comfort controls — are enabled straight away. Configuration and diagnostic entities (heating and cooling curve parameters, raw telemetry, API access counters) are created but disabled, so a fresh install is not flooded with a hundred entities.

To turn something on or off, go to Settings → Devices & services → ComfoClime, open the device, and use the entity's own enable/disable toggle. Disabled entities are not polled at all, so switching off the ones you don't need genuinely reduces the load on the device.

Missing a sensor you expected? Check the "+N entities disabled" link on the device page before opening an issue — it is almost always sitting there, disabled by default.

The integration's options dialog only holds connection tuning: timeouts, polling interval and caching, and request rate limiting. Raise the rate limiting values if you see timeouts or entities going unavailable; the ComfoClime's Airduino board is easily overwhelmed.

Climate Control Features

The integration provides a comprehensive climate control entity that unifies all temperature and ventilation control features:

HVAC Modes

  • Off: System standby mode
  • Heat: Heating mode (automatically sets season to heating)
  • Cool: Cooling mode (automatically sets season to cooling)
  • Fan Only: Ventilation only mode (season set to transition)

Preset Modes

  • Manual (none): Manual temperature control mode
  • Comfort: Maximum comfort temperature profile
  • Boost: Power saving temperature profile
  • Eco: Energy efficient temperature profile

Scenario Modes (via service call)

Special operating modes activated through the comfoclime.set_scenario_mode service:

  • Cooking: High ventilation for cooking (default: 30 min)
  • Party: High ventilation for parties (default: 30 min)
  • Away: Reduced mode for vacation (default: 24 hours)
  • Boost: Maximum power boost (default: 30 min)

Temperature Control

  • Set target temperature for heating (15-25°C) and cooling (20-28°C) seasons
  • Current temperature display from indoor sensor
  • Automatic temperature range adjustment based on active season

Smart Season Detection

The climate entity automatically:

  • Detects current season from ComfoClime dashboard
  • Adjusts available temperature ranges accordingly
  • Shows appropriate HVAC actions (heating/cooling/fan/idle)
  • Manages system state based on fan activity

Heat Pump Status Interpretation

The climate entity uses bitwise operations to accurately determine the current HVAC action from the heat pump status code:

  • Bit 1 (0x02): Heating mode flag
  • Bit 2 (0x04): Cooling mode flag

This ensures correct interpretation of all status codes, including transitional states:

Status CodeBinaryHVAC ActionDescription
00000 0000OffHeat pump is off
10000 0001IdleStarting up
30000 0011HeatingActively heating
50000 0101CoolingActively cooling
170001 0001IdleTransitional state
190001 0011HeatingHeating in transitional state
210001 0101CoolingCooling in transitional state
670100 0011HeatingHeating mode (defrosting?)
750100 1011HeatingHeating mode (defrosting + drying?)
830101 0011HeatingHeating mode

Current ToDo / development

There are many more telemetry and property values, that make sense to be offered by the integration. The ComfoClime unit itself is fully integrated but there are some missing sensors, switches and numbers of the ComfoAirQ unit to be added in the future. You are missing one? The definitions are in seperate files in the entities folder, so you can try them yourself. If they are working you can open an issue or directly open a pull request.

Feel free to participate! 🙋‍♂️

Thanks to...

@michaelarnauts and his integration of ComfoConnect, where I discovered a lot of telemetries and properties of the ventilation unit: https://github.com/michaelarnauts/aiocomfoconnect

Development

Releasing a New Version

This project uses automated release workflows that handle everything for you:

Creating a Stable Release

  1. Trigger the release workflow:
    • Go to Actions → Release workflow
    • Click "Run workflow"
    • Enter the version number (e.g., 2.1.0)
    • The workflow will automatically:
  • Update the version in custom_components/comfoclime/manifest.json
  • Update the version in pyproject.toml
    • Create a pull request with the version change
    • Auto-merge the PR (if branch protection allows)
    • Create and push a git tag
    • Generate a changelog from commits since the last tag
    • Create a GitHub release with the changelog

Creating a Pre-Release

Pre-releases are useful for beta testing new features before a stable release:

  1. Trigger the pre-release workflow:
    • Go to Actions → Pre-Release workflow
    • Click "Run workflow"
    • Enter the pre-release version number (e.g., 2.1.0b1)
    • Supported format: X.Y.ZbN
    • The workflow will automatically:
      • Update the version in custom_components/comfoclime/manifest.json
      • Update the version in pyproject.toml
      • Create a pull request with the version change
      • Auto-merge the PR (if branch protection allows)
      • Create and push a git tag
      • Generate a changelog from commits since the last tag
      • Create a GitHub pre-release with warning message

Note: The workflows create PRs for version updates to comply with branch protection rules. If auto-merge is enabled on the repository, the PRs will be merged automatically. Otherwise, you need to manually approve and merge the PR, then the release will be created.

Running Tests

The integration includes a comprehensive test suite covering all entity types. To run the tests:

# Install developer dependencies
uv sync --group dev
# Run all tests
uv run pytest tests/
# Run tests with coverage
uv run pytest tests/ --cov=custom_components/comfoclime --cov-report=html
# Run specific test file
uv run pytest tests/test_sensor.py -v

The test suite includes:

  • Unit tests for all entity types (sensor, switch, select, number, climate, fan)
  • API tests
  • Integration setup tests, including the config entry v1 → v2 migration
  • Conformance checks of the sensor definitions against the upstream protocol documentation (byte counts, signedness and scaling factors), so a wrong decode is caught rather than showing a plausible but wrong number
  • Consistency checks between entity definitions, the config flow and both translation files
  • Mock fixtures for testing without a real device

Tests are automatically run via GitHub Actions on push and pull requests.

Troubleshooting

Having issues with the integration? Check the "Bekannte Fallstricke" section in CLAUDE.md for common issues and solutions, including:

  • GitHub integration timeout errors (not related to ComfoClime)
  • Connection issues with the device
  • Entity update problems
  • Integration loading failures
  • Development environment issues

About

HomeAssistant integration of Zehnder ComfoClime

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

comfoclime

hacs_badgeTests

HomeAssistant integration of Zehnder ComfoClime (and all devices in ComfoNet bus like the ComfoAir Q)

Features

ComfoClime is a HVAC solution as additional device for the ComfoAir Q series. It comes with its own app and an propietary JSON API. The ComfoClime unit is connected to the local network via WiFi/WLAN, the API is available only local via HTTP requests without authentication. The integration can also control the ventilation main unit ComfoAir Q. It currently offers:

  • reading the dashboard data similar to the official app
  • climate control entity with HVAC modes (heat/cool/fan_only/off) and preset modes (comfort/boost/eco)
  • scenario modes (cooking, party, away, boost) for special operating situations
  • reading and writing the active temperature profile
  • setting the ventilation fan speed
  • autodiscovering all connected devices
  • property (r/w) and telemetry (r/o) values of all connected devices
  • service calls for setting properties, restarting the system, and activating scenario modes
  • configuration via config flow by host/ip
  • locales in english and german

Requirements

System Requirements

  • Home Assistant: ≥ 2026.5.0
  • Python: ≥ 3.14
  • aiohttp: ≥ 3.8.0, < 4.0
  • pydantic: ≥ 2.0.0

Supported Devices

  • Zehnder ComfoClime
  • Zehnder ComfoAir Q (ComfoNet Bus)
  • Other compatible ComfoNet devices

Developer Setup

  • Clone this repository or open it in a Codespace/Dev Container as described below
  • Install dependencies and set up the development environment
  • Home Assistant (2026.5.0+) and the integration will be available for local development and testing
  • Home Assistant runs automatically on port 8123.
  • See .devcontainer/README.md for detailed instructions.

Python Version Requirements

This integration requires Python 3.14.2 or newer: Home Assistant 2026.3+ declares Requires-Python >= 3.14.2, so an older 3.14 (including release candidates) silently resolves to Home Assistant 2026.2.x and the integration will fail to import. The Dev Container provides a compatible environment.

The source also uses PEP 758 unparenthesised except A, B: clauses, which ruff format produces because the project targets py314. On Python 3.13 or older these are a SyntaxError — that means the interpreter is too old, not that the file is broken. Do not add the parentheses back; the formatter removes them again.

📚 Documentation

All developer/AI-agent documentation (architecture, coding conventions, byte-decoding rules, entity categorization, scenario modes, services, troubleshooting) lives in a single place:

  • CLAUDE.md - the canonical technical reference for this repository

For the full, upstream reverse-engineered API/protocol reference, see:

Feel free to extend!

Development & Testing

Want to test or develop this integration? Use the included GitHub Codespace or Dev Container setup!

🚀 Quick Start:

  • Click "Code" → "Codespaces" → "Create codespace" on GitHub
  • Or open in VS Code with Dev Containers extension
  • Home Assistant runs automatically on port 8123
  • See .devcontainer/README.md for detailed instructions

This provides a complete Home Assistant development environment with debugging support.

Installation

  • add this repository via HACS (user defined repositories, URL: https://github.com/Revilo91/comfoclime)
  • install the "Zehnder ComfoClime" integration in HACS
  • restart Home Assistant
  • add the ComfoClime device (connected devices like the ComfoAir Q are detected and added automatically)

Choosing which entities you see

The integration creates every entity it knows about for the devices it finds, and lets Home Assistant decide what is shown. Everyday values — temperatures, air flows, fan speed, the climate and fan entities, the comfort controls — are enabled straight away. Configuration and diagnostic entities (heating and cooling curve parameters, raw telemetry, API access counters) are created but disabled, so a fresh install is not flooded with a hundred entities.

To turn something on or off, go to Settings → Devices & services → ComfoClime, open the device, and use the entity's own enable/disable toggle. Disabled entities are not polled at all, so switching off the ones you don't need genuinely reduces the load on the device.

Missing a sensor you expected? Check the "+N entities disabled" link on the device page before opening an issue — it is almost always sitting there, disabled by default.

The integration's options dialog only holds connection tuning: timeouts, polling interval and caching, and request rate limiting. Raise the rate limiting values if you see timeouts or entities going unavailable; the ComfoClime's Airduino board is easily overwhelmed.

Climate Control Features

The integration provides a comprehensive climate control entity that unifies all temperature and ventilation control features:

HVAC Modes

  • Off: System standby mode
  • Heat: Heating mode (automatically sets season to heating)
  • Cool: Cooling mode (automatically sets season to cooling)
  • Fan Only: Ventilation only mode (season set to transition)

Preset Modes

  • Manual (none): Manual temperature control mode
  • Comfort: Maximum comfort temperature profile
  • Boost: Power saving temperature profile
  • Eco: Energy efficient temperature profile

Scenario Modes (via service call)

Special operating modes activated through the comfoclime.set_scenario_mode service:

  • Cooking: High ventilation for cooking (default: 30 min)
  • Party: High ventilation for parties (default: 30 min)
  • Away: Reduced mode for vacation (default: 24 hours)
  • Boost: Maximum power boost (default: 30 min)

Temperature Control

  • Set target temperature for heating (15-25°C) and cooling (20-28°C) seasons
  • Current temperature display from indoor sensor
  • Automatic temperature range adjustment based on active season

Smart Season Detection

The climate entity automatically:

  • Detects current season from ComfoClime dashboard
  • Adjusts available temperature ranges accordingly
  • Shows appropriate HVAC actions (heating/cooling/fan/idle)
  • Manages system state based on fan activity

Heat Pump Status Interpretation

The climate entity uses bitwise operations to accurately determine the current HVAC action from the heat pump status code:

  • Bit 1 (0x02): Heating mode flag
  • Bit 2 (0x04): Cooling mode flag

This ensures correct interpretation of all status codes, including transitional states:

Status CodeBinaryHVAC ActionDescription
00000 0000OffHeat pump is off
10000 0001IdleStarting up
30000 0011HeatingActively heating
50000 0101CoolingActively cooling
170001 0001IdleTransitional state
190001 0011HeatingHeating in transitional state
210001 0101CoolingCooling in transitional state
670100 0011HeatingHeating mode (defrosting?)
750100 1011HeatingHeating mode (defrosting + drying?)
830101 0011HeatingHeating mode

Current ToDo / development

There are many more telemetry and property values, that make sense to be offered by the integration. The ComfoClime unit itself is fully integrated but there are some missing sensors, switches and numbers of the ComfoAirQ unit to be added in the future. You are missing one? The definitions are in seperate files in the entities folder, so you can try them yourself. If they are working you can open an issue or directly open a pull request.

Feel free to participate! 🙋‍♂️

Thanks to...

@michaelarnauts and his integration of ComfoConnect, where I discovered a lot of telemetries and properties of the ventilation unit: https://github.com/michaelarnauts/aiocomfoconnect

Development

Releasing a New Version

This project uses automated release workflows that handle everything for you:

Creating a Stable Release

  1. Trigger the release workflow:
    • Go to Actions → Release workflow
    • Click "Run workflow"
    • Enter the version number (e.g., 2.1.0)
    • The workflow will automatically:
  • Update the version in custom_components/comfoclime/manifest.json
  • Update the version in pyproject.toml
    • Create a pull request with the version change
    • Auto-merge the PR (if branch protection allows)
    • Create and push a git tag
    • Generate a changelog from commits since the last tag
    • Create a GitHub release with the changelog

Creating a Pre-Release

Pre-releases are useful for beta testing new features before a stable release:

  1. Trigger the pre-release workflow:
    • Go to Actions → Pre-Release workflow
    • Click "Run workflow"
    • Enter the pre-release version number (e.g., 2.1.0b1)
    • Supported format: X.Y.ZbN
    • The workflow will automatically:
      • Update the version in custom_components/comfoclime/manifest.json
      • Update the version in pyproject.toml
      • Create a pull request with the version change
      • Auto-merge the PR (if branch protection allows)
      • Create and push a git tag
      • Generate a changelog from commits since the last tag
      • Create a GitHub pre-release with warning message

Note: The workflows create PRs for version updates to comply with branch protection rules. If auto-merge is enabled on the repository, the PRs will be merged automatically. Otherwise, you need to manually approve and merge the PR, then the release will be created.

Running Tests

The integration includes a comprehensive test suite covering all entity types. To run the tests:

# Install developer dependencies
uv sync --group dev
# Run all tests
uv run pytest tests/
# Run tests with coverage
uv run pytest tests/ --cov=custom_components/comfoclime --cov-report=html
# Run specific test file
uv run pytest tests/test_sensor.py -v

The test suite includes:

  • Unit tests for all entity types (sensor, switch, select, number, climate, fan)
  • API tests
  • Integration setup tests, including the config entry v1 → v2 migration
  • Conformance checks of the sensor definitions against the upstream protocol documentation (byte counts, signedness and scaling factors), so a wrong decode is caught rather than showing a plausible but wrong number
  • Consistency checks between entity definitions, the config flow and both translation files
  • Mock fixtures for testing without a real device

Tests are automatically run via GitHub Actions on push and pull requests.

Troubleshooting

Having issues with the integration? Check the "Bekannte Fallstricke" section in CLAUDE.md for common issues and solutions, including:

  • GitHub integration timeout errors (not related to ComfoClime)
  • Connection issues with the device
  • Entity update problems
  • Integration loading failures
  • Development environment issues

About

HomeAssistant integration of Zehnder ComfoClime

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Repository files navigation

comfoclime

hacs_badgeTests

HomeAssistant integration of Zehnder ComfoClime (and all devices in ComfoNet bus like the ComfoAir Q)

Features

ComfoClime is a HVAC solution as additional device for the ComfoAir Q series. It comes with its own app and an propietary JSON API. The ComfoClime unit is connected to the local network via WiFi/WLAN, the API is available only local via HTTP requests without authentication. The integration can also control the ventilation main unit ComfoAir Q. It currently offers:

  • reading the dashboard data similar to the official app
  • climate control entity with HVAC modes (heat/cool/fan_only/off) and preset modes (comfort/boost/eco)
  • scenario modes (cooking, party, away, boost) for special operating situations
  • reading and writing the active temperature profile
  • setting the ventilation fan speed
  • autodiscovering all connected devices
  • property (r/w) and telemetry (r/o) values of all connected devices
  • service calls for setting properties, restarting the system, and activating scenario modes
  • configuration via config flow by host/ip
  • locales in english and german

Requirements

System Requirements

  • Home Assistant: ≥ 2026.5.0
  • Python: ≥ 3.14
  • aiohttp: ≥ 3.8.0, < 4.0
  • pydantic: ≥ 2.0.0

Supported Devices

  • Zehnder ComfoClime
  • Zehnder ComfoAir Q (ComfoNet Bus)
  • Other compatible ComfoNet devices

Developer Setup

  • Clone this repository or open it in a Codespace/Dev Container as described below
  • Install dependencies and set up the development environment
  • Home Assistant (2026.5.0+) and the integration will be available for local development and testing
  • Home Assistant runs automatically on port 8123.
  • See .devcontainer/README.md for detailed instructions.

Python Version Requirements

This integration requires Python 3.14.2 or newer: Home Assistant 2026.3+ declares Requires-Python >= 3.14.2, so an older 3.14 (including release candidates) silently resolves to Home Assistant 2026.2.x and the integration will fail to import. The Dev Container provides a compatible environment.

The source also uses PEP 758 unparenthesised except A, B: clauses, which ruff format produces because the project targets py314. On Python 3.13 or older these are a SyntaxError — that means the interpreter is too old, not that the file is broken. Do not add the parentheses back; the formatter removes them again.

📚 Documentation

All developer/AI-agent documentation (architecture, coding conventions, byte-decoding rules, entity categorization, scenario modes, services, troubleshooting) lives in a single place:

  • CLAUDE.md - the canonical technical reference for this repository

For the full, upstream reverse-engineered API/protocol reference, see:

Feel free to extend!

Development & Testing

Want to test or develop this integration? Use the included GitHub Codespace or Dev Container setup!

🚀 Quick Start:

  • Click "Code" → "Codespaces" → "Create codespace" on GitHub
  • Or open in VS Code with Dev Containers extension
  • Home Assistant runs automatically on port 8123
  • See .devcontainer/README.md for detailed instructions

This provides a complete Home Assistant development environment with debugging support.

Installation

  • add this repository via HACS (user defined repositories, URL: https://github.com/Revilo91/comfoclime)
  • install the "Zehnder ComfoClime" integration in HACS
  • restart Home Assistant
  • add the ComfoClime device (connected devices like the ComfoAir Q are detected and added automatically)

Choosing which entities you see

The integration creates every entity it knows about for the devices it finds, and lets Home Assistant decide what is shown. Everyday values — temperatures, air flows, fan speed, the climate and fan entities, the comfort controls — are enabled straight away. Configuration and diagnostic entities (heating and cooling curve parameters, raw telemetry, API access counters) are created but disabled, so a fresh install is not flooded with a hundred entities.

To turn something on or off, go to Settings → Devices & services → ComfoClime, open the device, and use the entity's own enable/disable toggle. Disabled entities are not polled at all, so switching off the ones you don't need genuinely reduces the load on the device.

Missing a sensor you expected? Check the "+N entities disabled" link on the device page before opening an issue — it is almost always sitting there, disabled by default.

The integration's options dialog only holds connection tuning: timeouts, polling interval and caching, and request rate limiting. Raise the rate limiting values if you see timeouts or entities going unavailable; the ComfoClime's Airduino board is easily overwhelmed.

Climate Control Features

The integration provides a comprehensive climate control entity that unifies all temperature and ventilation control features:

HVAC Modes

  • Off: System standby mode
  • Heat: Heating mode (automatically sets season to heating)
  • Cool: Cooling mode (automatically sets season to cooling)
  • Fan Only: Ventilation only mode (season set to transition)

Preset Modes

  • Manual (none): Manual temperature control mode
  • Comfort: Maximum comfort temperature profile
  • Boost: Power saving temperature profile
  • Eco: Energy efficient temperature profile

Scenario Modes (via service call)

Special operating modes activated through the comfoclime.set_scenario_mode service:

  • Cooking: High ventilation for cooking (default: 30 min)
  • Party: High ventilation for parties (default: 30 min)
  • Away: Reduced mode for vacation (default: 24 hours)
  • Boost: Maximum power boost (default: 30 min)

Temperature Control

  • Set target temperature for heating (15-25°C) and cooling (20-28°C) seasons
  • Current temperature display from indoor sensor
  • Automatic temperature range adjustment based on active season

Smart Season Detection

The climate entity automatically:

  • Detects current season from ComfoClime dashboard
  • Adjusts available temperature ranges accordingly
  • Shows appropriate HVAC actions (heating/cooling/fan/idle)
  • Manages system state based on fan activity

Heat Pump Status Interpretation

The climate entity uses bitwise operations to accurately determine the current HVAC action from the heat pump status code:

  • Bit 1 (0x02): Heating mode flag
  • Bit 2 (0x04): Cooling mode flag

This ensures correct interpretation of all status codes, including transitional states:

Status CodeBinaryHVAC ActionDescription
00000 0000OffHeat pump is off
10000 0001IdleStarting up
30000 0011HeatingActively heating
50000 0101CoolingActively cooling
170001 0001IdleTransitional state
190001 0011HeatingHeating in transitional state
210001 0101CoolingCooling in transitional state
670100 0011HeatingHeating mode (defrosting?)
750100 1011HeatingHeating mode (defrosting + drying?)
830101 0011HeatingHeating mode

Current ToDo / development

There are many more telemetry and property values, that make sense to be offered by the integration. The ComfoClime unit itself is fully integrated but there are some missing sensors, switches and numbers of the ComfoAirQ unit to be added in the future. You are missing one? The definitions are in seperate files in the entities folder, so you can try them yourself. If they are working you can open an issue or directly open a pull request.

Feel free to participate! 🙋‍♂️

Thanks to...

@michaelarnauts and his integration of ComfoConnect, where I discovered a lot of telemetries and properties of the ventilation unit: https://github.com/michaelarnauts/aiocomfoconnect

Development

Releasing a New Version

This project uses automated release workflows that handle everything for you:

Creating a Stable Release

  1. Trigger the release workflow:
    • Go to Actions → Release workflow
    • Click "Run workflow"
    • Enter the version number (e.g., 2.1.0)
    • The workflow will automatically:
  • Update the version in custom_components/comfoclime/manifest.json
  • Update the version in pyproject.toml
    • Create a pull request with the version change
    • Auto-merge the PR (if branch protection allows)
    • Create and push a git tag
    • Generate a changelog from commits since the last tag
    • Create a GitHub release with the changelog

Creating a Pre-Release

Pre-releases are useful for beta testing new features before a stable release:

  1. Trigger the pre-release workflow:
    • Go to Actions → Pre-Release workflow
    • Click "Run workflow"
    • Enter the pre-release version number (e.g., 2.1.0b1)
    • Supported format: X.Y.ZbN
    • The workflow will automatically:
      • Update the version in custom_components/comfoclime/manifest.json
      • Update the version in pyproject.toml
      • Create a pull request with the version change
      • Auto-merge the PR (if branch protection allows)
      • Create and push a git tag
      • Generate a changelog from commits since the last tag
      • Create a GitHub pre-release with warning message

Note: The workflows create PRs for version updates to comply with branch protection rules. If auto-merge is enabled on the repository, the PRs will be merged automatically. Otherwise, you need to manually approve and merge the PR, then the release will be created.

Running Tests

The integration includes a comprehensive test suite covering all entity types. To run the tests:

# Install developer dependencies
uv sync --group dev
# Run all tests
uv run pytest tests/
# Run tests with coverage
uv run pytest tests/ --cov=custom_components/comfoclime --cov-report=html
# Run specific test file
uv run pytest tests/test_sensor.py -v

The test suite includes:

  • Unit tests for all entity types (sensor, switch, select, number, climate, fan)
  • API tests
  • Integration setup tests, including the config entry v1 → v2 migration
  • Conformance checks of the sensor definitions against the upstream protocol documentation (byte counts, signedness and scaling factors), so a wrong decode is caught rather than showing a plausible but wrong number
  • Consistency checks between entity definitions, the config flow and both translation files
  • Mock fixtures for testing without a real device

Tests are automatically run via GitHub Actions on push and pull requests.

Troubleshooting

Having issues with the integration? Check the "Bekannte Fallstricke" section in CLAUDE.md for common issues and solutions, including:

  • GitHub integration timeout errors (not related to ComfoClime)
  • Connection issues with the device
  • Entity update problems
  • Integration loading failures
  • Development environment issues

About

HomeAssistant integration of Zehnder ComfoClime

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

comfoclime

hacs_badgeTests

HomeAssistant integration of Zehnder ComfoClime (and all devices in ComfoNet bus like the ComfoAir Q)

Features

ComfoClime is a HVAC solution as additional device for the ComfoAir Q series. It comes with its own app and an propietary JSON API. The ComfoClime unit is connected to the local network via WiFi/WLAN, the API is available only local via HTTP requests without authentication. The integration can also control the ventilation main unit ComfoAir Q. It currently offers:

  • reading the dashboard data similar to the official app
  • climate control entity with HVAC modes (heat/cool/fan_only/off) and preset modes (comfort/boost/eco)
  • scenario modes (cooking, party, away, boost) for special operating situations
  • reading and writing the active temperature profile
  • setting the ventilation fan speed
  • autodiscovering all connected devices
  • property (r/w) and telemetry (r/o) values of all connected devices
  • service calls for setting properties, restarting the system, and activating scenario modes
  • configuration via config flow by host/ip
  • locales in english and german

Requirements

System Requirements

  • Home Assistant: ≥ 2026.5.0
  • Python: ≥ 3.14
  • aiohttp: ≥ 3.8.0, < 4.0
  • pydantic: ≥ 2.0.0

Supported Devices

  • Zehnder ComfoClime
  • Zehnder ComfoAir Q (ComfoNet Bus)
  • Other compatible ComfoNet devices

Developer Setup

  • Clone this repository or open it in a Codespace/Dev Container as described below
  • Install dependencies and set up the development environment
  • Home Assistant (2026.5.0+) and the integration will be available for local development and testing
  • Home Assistant runs automatically on port 8123.
  • See .devcontainer/README.md for detailed instructions.

Python Version Requirements

This integration requires Python 3.14.2 or newer: Home Assistant 2026.3+ declares Requires-Python >= 3.14.2, so an older 3.14 (including release candidates) silently resolves to Home Assistant 2026.2.x and the integration will fail to import. The Dev Container provides a compatible environment.

The source also uses PEP 758 unparenthesised except A, B: clauses, which ruff format produces because the project targets py314. On Python 3.13 or older these are a SyntaxError — that means the interpreter is too old, not that the file is broken. Do not add the parentheses back; the formatter removes them again.

📚 Documentation

All developer/AI-agent documentation (architecture, coding conventions, byte-decoding rules, entity categorization, scenario modes, services, troubleshooting) lives in a single place:

  • CLAUDE.md - the canonical technical reference for this repository

For the full, upstream reverse-engineered API/protocol reference, see:

Feel free to extend!

Development & Testing

Want to test or develop this integration? Use the included GitHub Codespace or Dev Container setup!

🚀 Quick Start:

  • Click "Code" → "Codespaces" → "Create codespace" on GitHub
  • Or open in VS Code with Dev Containers extension
  • Home Assistant runs automatically on port 8123
  • See .devcontainer/README.md for detailed instructions

This provides a complete Home Assistant development environment with debugging support.

Installation

  • add this repository via HACS (user defined repositories, URL: https://github.com/Revilo91/comfoclime)
  • install the "Zehnder ComfoClime" integration in HACS
  • restart Home Assistant
  • add the ComfoClime device (connected devices like the ComfoAir Q are detected and added automatically)

Choosing which entities you see

The integration creates every entity it knows about for the devices it finds, and lets Home Assistant decide what is shown. Everyday values — temperatures, air flows, fan speed, the climate and fan entities, the comfort controls — are enabled straight away. Configuration and diagnostic entities (heating and cooling curve parameters, raw telemetry, API access counters) are created but disabled, so a fresh install is not flooded with a hundred entities.

To turn something on or off, go to Settings → Devices & services → ComfoClime, open the device, and use the entity's own enable/disable toggle. Disabled entities are not polled at all, so switching off the ones you don't need genuinely reduces the load on the device.

Missing a sensor you expected? Check the "+N entities disabled" link on the device page before opening an issue — it is almost always sitting there, disabled by default.

The integration's options dialog only holds connection tuning: timeouts, polling interval and caching, and request rate limiting. Raise the rate limiting values if you see timeouts or entities going unavailable; the ComfoClime's Airduino board is easily overwhelmed.

Climate Control Features

The integration provides a comprehensive climate control entity that unifies all temperature and ventilation control features:

HVAC Modes

  • Off: System standby mode
  • Heat: Heating mode (automatically sets season to heating)
  • Cool: Cooling mode (automatically sets season to cooling)
  • Fan Only: Ventilation only mode (season set to transition)

Preset Modes

  • Manual (none): Manual temperature control mode
  • Comfort: Maximum comfort temperature profile
  • Boost: Power saving temperature profile
  • Eco: Energy efficient temperature profile

Scenario Modes (via service call)

Special operating modes activated through the comfoclime.set_scenario_mode service:

  • Cooking: High ventilation for cooking (default: 30 min)
  • Party: High ventilation for parties (default: 30 min)
  • Away: Reduced mode for vacation (default: 24 hours)
  • Boost: Maximum power boost (default: 30 min)

Temperature Control

  • Set target temperature for heating (15-25°C) and cooling (20-28°C) seasons
  • Current temperature display from indoor sensor
  • Automatic temperature range adjustment based on active season

Smart Season Detection

The climate entity automatically:

  • Detects current season from ComfoClime dashboard
  • Adjusts available temperature ranges accordingly
  • Shows appropriate HVAC actions (heating/cooling/fan/idle)
  • Manages system state based on fan activity

Heat Pump Status Interpretation

The climate entity uses bitwise operations to accurately determine the current HVAC action from the heat pump status code:

  • Bit 1 (0x02): Heating mode flag
  • Bit 2 (0x04): Cooling mode flag

This ensures correct interpretation of all status codes, including transitional states:

Status CodeBinaryHVAC ActionDescription
00000 0000OffHeat pump is off
10000 0001IdleStarting up
30000 0011HeatingActively heating
50000 0101CoolingActively cooling
170001 0001IdleTransitional state
190001 0011HeatingHeating in transitional state
210001 0101CoolingCooling in transitional state
670100 0011HeatingHeating mode (defrosting?)
750100 1011HeatingHeating mode (defrosting + drying?)
830101 0011HeatingHeating mode

Current ToDo / development

There are many more telemetry and property values, that make sense to be offered by the integration. The ComfoClime unit itself is fully integrated but there are some missing sensors, switches and numbers of the ComfoAirQ unit to be added in the future. You are missing one? The definitions are in seperate files in the entities folder, so you can try them yourself. If they are working you can open an issue or directly open a pull request.

Feel free to participate! 🙋‍♂️

Thanks to...

@michaelarnauts and his integration of ComfoConnect, where I discovered a lot of telemetries and properties of the ventilation unit: https://github.com/michaelarnauts/aiocomfoconnect

Development

Releasing a New Version

This project uses automated release workflows that handle everything for you:

Creating a Stable Release

  1. Trigger the release workflow:
    • Go to Actions → Release workflow
    • Click "Run workflow"
    • Enter the version number (e.g., 2.1.0)
    • The workflow will automatically:
  • Update the version in custom_components/comfoclime/manifest.json
  • Update the version in pyproject.toml
    • Create a pull request with the version change
    • Auto-merge the PR (if branch protection allows)
    • Create and push a git tag
    • Generate a changelog from commits since the last tag
    • Create a GitHub release with the changelog

Creating a Pre-Release

Pre-releases are useful for beta testing new features before a stable release:

  1. Trigger the pre-release workflow:
    • Go to Actions → Pre-Release workflow
    • Click "Run workflow"
    • Enter the pre-release version number (e.g., 2.1.0b1)
    • Supported format: X.Y.ZbN
    • The workflow will automatically:
      • Update the version in custom_components/comfoclime/manifest.json
      • Update the version in pyproject.toml
      • Create a pull request with the version change
      • Auto-merge the PR (if branch protection allows)
      • Create and push a git tag
      • Generate a changelog from commits since the last tag
      • Create a GitHub pre-release with warning message

Note: The workflows create PRs for version updates to comply with branch protection rules. If auto-merge is enabled on the repository, the PRs will be merged automatically. Otherwise, you need to manually approve and merge the PR, then the release will be created.

Running Tests

The integration includes a comprehensive test suite covering all entity types. To run the tests:

# Install developer dependencies
uv sync --group dev
# Run all tests
uv run pytest tests/
# Run tests with coverage
uv run pytest tests/ --cov=custom_components/comfoclime --cov-report=html
# Run specific test file
uv run pytest tests/test_sensor.py -v

The test suite includes:

  • Unit tests for all entity types (sensor, switch, select, number, climate, fan)
  • API tests
  • Integration setup tests, including the config entry v1 → v2 migration
  • Conformance checks of the sensor definitions against the upstream protocol documentation (byte counts, signedness and scaling factors), so a wrong decode is caught rather than showing a plausible but wrong number
  • Consistency checks between entity definitions, the config flow and both translation files
  • Mock fixtures for testing without a real device

Tests are automatically run via GitHub Actions on push and pull requests.

Troubleshooting

Having issues with the integration? Check the "Bekannte Fallstricke" section in CLAUDE.md for common issues and solutions, including:

  • GitHub integration timeout errors (not related to ComfoClime)
  • Connection issues with the device
  • Entity update problems
  • Integration loading failures
  • Development environment issues

About

HomeAssistant integration of Zehnder ComfoClime

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

comfoclime

hacs_badgeTests

HomeAssistant integration of Zehnder ComfoClime (and all devices in ComfoNet bus like the ComfoAir Q)

Features

ComfoClime is a HVAC solution as additional device for the ComfoAir Q series. It comes with its own app and an propietary JSON API. The ComfoClime unit is connected to the local network via WiFi/WLAN, the API is available only local via HTTP requests without authentication. The integration can also control the ventilation main unit ComfoAir Q. It currently offers:

  • reading the dashboard data similar to the official app
  • climate control entity with HVAC modes (heat/cool/fan_only/off) and preset modes (comfort/boost/eco)
  • scenario modes (cooking, party, away, boost) for special operating situations
  • reading and writing the active temperature profile
  • setting the ventilation fan speed
  • autodiscovering all connected devices
  • property (r/w) and telemetry (r/o) values of all connected devices
  • service calls for setting properties, restarting the system, and activating scenario modes
  • configuration via config flow by host/ip
  • locales in english and german

Requirements

System Requirements

  • Home Assistant: ≥ 2026.5.0
  • Python: ≥ 3.14
  • aiohttp: ≥ 3.8.0, < 4.0
  • pydantic: ≥ 2.0.0

Supported Devices

  • Zehnder ComfoClime
  • Zehnder ComfoAir Q (ComfoNet Bus)
  • Other compatible ComfoNet devices

Developer Setup

  • Clone this repository or open it in a Codespace/Dev Container as described below
  • Install dependencies and set up the development environment
  • Home Assistant (2026.5.0+) and the integration will be available for local development and testing
  • Home Assistant runs automatically on port 8123.
  • See .devcontainer/README.md for detailed instructions.

Python Version Requirements

This integration requires Python 3.14.2 or newer: Home Assistant 2026.3+ declares Requires-Python >= 3.14.2, so an older 3.14 (including release candidates) silently resolves to Home Assistant 2026.2.x and the integration will fail to import. The Dev Container provides a compatible environment.

The source also uses PEP 758 unparenthesised except A, B: clauses, which ruff format produces because the project targets py314. On Python 3.13 or older these are a SyntaxError — that means the interpreter is too old, not that the file is broken. Do not add the parentheses back; the formatter removes them again.

📚 Documentation

All developer/AI-agent documentation (architecture, coding conventions, byte-decoding rules, entity categorization, scenario modes, services, troubleshooting) lives in a single place:

  • CLAUDE.md - the canonical technical reference for this repository

For the full, upstream reverse-engineered API/protocol reference, see:

Feel free to extend!

Development & Testing

Want to test or develop this integration? Use the included GitHub Codespace or Dev Container setup!

🚀 Quick Start:

  • Click "Code" → "Codespaces" → "Create codespace" on GitHub
  • Or open in VS Code with Dev Containers extension
  • Home Assistant runs automatically on port 8123
  • See .devcontainer/README.md for detailed instructions

This provides a complete Home Assistant development environment with debugging support.

Installation

  • add this repository via HACS (user defined repositories, URL: https://github.com/Revilo91/comfoclime)
  • install the "Zehnder ComfoClime" integration in HACS
  • restart Home Assistant
  • add the ComfoClime device (connected devices like the ComfoAir Q are detected and added automatically)

Choosing which entities you see

The integration creates every entity it knows about for the devices it finds, and lets Home Assistant decide what is shown. Everyday values — temperatures, air flows, fan speed, the climate and fan entities, the comfort controls — are enabled straight away. Configuration and diagnostic entities (heating and cooling curve parameters, raw telemetry, API access counters) are created but disabled, so a fresh install is not flooded with a hundred entities.

To turn something on or off, go to Settings → Devices & services → ComfoClime, open the device, and use the entity's own enable/disable toggle. Disabled entities are not polled at all, so switching off the ones you don't need genuinely reduces the load on the device.

Missing a sensor you expected? Check the "+N entities disabled" link on the device page before opening an issue — it is almost always sitting there, disabled by default.

The integration's options dialog only holds connection tuning: timeouts, polling interval and caching, and request rate limiting. Raise the rate limiting values if you see timeouts or entities going unavailable; the ComfoClime's Airduino board is easily overwhelmed.

Climate Control Features

The integration provides a comprehensive climate control entity that unifies all temperature and ventilation control features:

HVAC Modes

  • Off: System standby mode
  • Heat: Heating mode (automatically sets season to heating)
  • Cool: Cooling mode (automatically sets season to cooling)
  • Fan Only: Ventilation only mode (season set to transition)

Preset Modes

  • Manual (none): Manual temperature control mode
  • Comfort: Maximum comfort temperature profile
  • Boost: Power saving temperature profile
  • Eco: Energy efficient temperature profile

Scenario Modes (via service call)

Special operating modes activated through the comfoclime.set_scenario_mode service:

  • Cooking: High ventilation for cooking (default: 30 min)
  • Party: High ventilation for parties (default: 30 min)
  • Away: Reduced mode for vacation (default: 24 hours)
  • Boost: Maximum power boost (default: 30 min)

Temperature Control

  • Set target temperature for heating (15-25°C) and cooling (20-28°C) seasons
  • Current temperature display from indoor sensor
  • Automatic temperature range adjustment based on active season

Smart Season Detection

The climate entity automatically:

  • Detects current season from ComfoClime dashboard
  • Adjusts available temperature ranges accordingly
  • Shows appropriate HVAC actions (heating/cooling/fan/idle)
  • Manages system state based on fan activity

Heat Pump Status Interpretation

The climate entity uses bitwise operations to accurately determine the current HVAC action from the heat pump status code:

  • Bit 1 (0x02): Heating mode flag
  • Bit 2 (0x04): Cooling mode flag

This ensures correct interpretation of all status codes, including transitional states:

Status CodeBinaryHVAC ActionDescription
00000 0000OffHeat pump is off
10000 0001IdleStarting up
30000 0011HeatingActively heating
50000 0101CoolingActively cooling
170001 0001IdleTransitional state
190001 0011HeatingHeating in transitional state
210001 0101CoolingCooling in transitional state
670100 0011HeatingHeating mode (defrosting?)
750100 1011HeatingHeating mode (defrosting + drying?)
830101 0011HeatingHeating mode

Current ToDo / development

There are many more telemetry and property values, that make sense to be offered by the integration. The ComfoClime unit itself is fully integrated but there are some missing sensors, switches and numbers of the ComfoAirQ unit to be added in the future. You are missing one? The definitions are in seperate files in the entities folder, so you can try them yourself. If they are working you can open an issue or directly open a pull request.

Feel free to participate! 🙋‍♂️

Thanks to...

@michaelarnauts and his integration of ComfoConnect, where I discovered a lot of telemetries and properties of the ventilation unit: https://github.com/michaelarnauts/aiocomfoconnect

Development

Releasing a New Version

This project uses automated release workflows that handle everything for you:

Creating a Stable Release

  1. Trigger the release workflow:
    • Go to Actions → Release workflow
    • Click "Run workflow"
    • Enter the version number (e.g., 2.1.0)
    • The workflow will automatically:
  • Update the version in custom_components/comfoclime/manifest.json
  • Update the version in pyproject.toml
    • Create a pull request with the version change
    • Auto-merge the PR (if branch protection allows)
    • Create and push a git tag
    • Generate a changelog from commits since the last tag
    • Create a GitHub release with the changelog

Creating a Pre-Release

Pre-releases are useful for beta testing new features before a stable release:

  1. Trigger the pre-release workflow:
    • Go to Actions → Pre-Release workflow
    • Click "Run workflow"
    • Enter the pre-release version number (e.g., 2.1.0b1)
    • Supported format: X.Y.ZbN
    • The workflow will automatically:
      • Update the version in custom_components/comfoclime/manifest.json
      • Update the version in pyproject.toml
      • Create a pull request with the version change
      • Auto-merge the PR (if branch protection allows)
      • Create and push a git tag
      • Generate a changelog from commits since the last tag
      • Create a GitHub pre-release with warning message

Note: The workflows create PRs for version updates to comply with branch protection rules. If auto-merge is enabled on the repository, the PRs will be merged automatically. Otherwise, you need to manually approve and merge the PR, then the release will be created.

Running Tests

The integration includes a comprehensive test suite covering all entity types. To run the tests:

# Install developer dependencies
uv sync --group dev
# Run all tests
uv run pytest tests/
# Run tests with coverage
uv run pytest tests/ --cov=custom_components/comfoclime --cov-report=html
# Run specific test file
uv run pytest tests/test_sensor.py -v

The test suite includes:

  • Unit tests for all entity types (sensor, switch, select, number, climate, fan)
  • API tests
  • Integration setup tests, including the config entry v1 → v2 migration
  • Conformance checks of the sensor definitions against the upstream protocol documentation (byte counts, signedness and scaling factors), so a wrong decode is caught rather than showing a plausible but wrong number
  • Consistency checks between entity definitions, the config flow and both translation files
  • Mock fixtures for testing without a real device

Tests are automatically run via GitHub Actions on push and pull requests.

Troubleshooting

Having issues with the integration? Check the "Bekannte Fallstricke" section in CLAUDE.md for common issues and solutions, including:

  • GitHub integration timeout errors (not related to ComfoClime)
  • Connection issues with the device
  • Entity update problems
  • Integration loading failures
  • Development environment issues

About

HomeAssistant integration of Zehnder ComfoClime

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Repository files navigation

comfoclime

hacs_badgeTests

HomeAssistant integration of Zehnder ComfoClime (and all devices in ComfoNet bus like the ComfoAir Q)

Features

ComfoClime is a HVAC solution as additional device for the ComfoAir Q series. It comes with its own app and an propietary JSON API. The ComfoClime unit is connected to the local network via WiFi/WLAN, the API is available only local via HTTP requests without authentication. The integration can also control the ventilation main unit ComfoAir Q. It currently offers:

  • reading the dashboard data similar to the official app
  • climate control entity with HVAC modes (heat/cool/fan_only/off) and preset modes (comfort/boost/eco)
  • scenario modes (cooking, party, away, boost) for special operating situations
  • reading and writing the active temperature profile
  • setting the ventilation fan speed
  • autodiscovering all connected devices
  • property (r/w) and telemetry (r/o) values of all connected devices
  • service calls for setting properties, restarting the system, and activating scenario modes
  • configuration via config flow by host/ip
  • locales in english and german

Requirements

System Requirements

  • Home Assistant: ≥ 2026.5.0
  • Python: ≥ 3.14
  • aiohttp: ≥ 3.8.0, < 4.0
  • pydantic: ≥ 2.0.0

Supported Devices

  • Zehnder ComfoClime
  • Zehnder ComfoAir Q (ComfoNet Bus)
  • Other compatible ComfoNet devices

Developer Setup

  • Clone this repository or open it in a Codespace/Dev Container as described below
  • Install dependencies and set up the development environment
  • Home Assistant (2026.5.0+) and the integration will be available for local development and testing
  • Home Assistant runs automatically on port 8123.
  • See .devcontainer/README.md for detailed instructions.

Python Version Requirements

This integration requires Python 3.14.2 or newer: Home Assistant 2026.3+ declares Requires-Python >= 3.14.2, so an older 3.14 (including release candidates) silently resolves to Home Assistant 2026.2.x and the integration will fail to import. The Dev Container provides a compatible environment.

The source also uses PEP 758 unparenthesised except A, B: clauses, which ruff format produces because the project targets py314. On Python 3.13 or older these are a SyntaxError — that means the interpreter is too old, not that the file is broken. Do not add the parentheses back; the formatter removes them again.

📚 Documentation

All developer/AI-agent documentation (architecture, coding conventions, byte-decoding rules, entity categorization, scenario modes, services, troubleshooting) lives in a single place:

  • CLAUDE.md - the canonical technical reference for this repository

For the full, upstream reverse-engineered API/protocol reference, see:

Feel free to extend!

Development & Testing

Want to test or develop this integration? Use the included GitHub Codespace or Dev Container setup!

🚀 Quick Start:

  • Click "Code" → "Codespaces" → "Create codespace" on GitHub
  • Or open in VS Code with Dev Containers extension
  • Home Assistant runs automatically on port 8123
  • See .devcontainer/README.md for detailed instructions

This provides a complete Home Assistant development environment with debugging support.

Installation

  • add this repository via HACS (user defined repositories, URL: https://github.com/Revilo91/comfoclime)
  • install the "Zehnder ComfoClime" integration in HACS
  • restart Home Assistant
  • add the ComfoClime device (connected devices like the ComfoAir Q are detected and added automatically)

Choosing which entities you see

The integration creates every entity it knows about for the devices it finds, and lets Home Assistant decide what is shown. Everyday values — temperatures, air flows, fan speed, the climate and fan entities, the comfort controls — are enabled straight away. Configuration and diagnostic entities (heating and cooling curve parameters, raw telemetry, API access counters) are created but disabled, so a fresh install is not flooded with a hundred entities.

To turn something on or off, go to Settings → Devices & services → ComfoClime, open the device, and use the entity's own enable/disable toggle. Disabled entities are not polled at all, so switching off the ones you don't need genuinely reduces the load on the device.

Missing a sensor you expected? Check the "+N entities disabled" link on the device page before opening an issue — it is almost always sitting there, disabled by default.

The integration's options dialog only holds connection tuning: timeouts, polling interval and caching, and request rate limiting. Raise the rate limiting values if you see timeouts or entities going unavailable; the ComfoClime's Airduino board is easily overwhelmed.

Climate Control Features

The integration provides a comprehensive climate control entity that unifies all temperature and ventilation control features:

HVAC Modes

  • Off: System standby mode
  • Heat: Heating mode (automatically sets season to heating)
  • Cool: Cooling mode (automatically sets season to cooling)
  • Fan Only: Ventilation only mode (season set to transition)

Preset Modes

  • Manual (none): Manual temperature control mode
  • Comfort: Maximum comfort temperature profile
  • Boost: Power saving temperature profile
  • Eco: Energy efficient temperature profile

Scenario Modes (via service call)

Special operating modes activated through the comfoclime.set_scenario_mode service:

  • Cooking: High ventilation for cooking (default: 30 min)
  • Party: High ventilation for parties (default: 30 min)
  • Away: Reduced mode for vacation (default: 24 hours)
  • Boost: Maximum power boost (default: 30 min)

Temperature Control

  • Set target temperature for heating (15-25°C) and cooling (20-28°C) seasons
  • Current temperature display from indoor sensor
  • Automatic temperature range adjustment based on active season

Smart Season Detection

The climate entity automatically:

  • Detects current season from ComfoClime dashboard
  • Adjusts available temperature ranges accordingly
  • Shows appropriate HVAC actions (heating/cooling/fan/idle)
  • Manages system state based on fan activity

Heat Pump Status Interpretation

The climate entity uses bitwise operations to accurately determine the current HVAC action from the heat pump status code:

  • Bit 1 (0x02): Heating mode flag
  • Bit 2 (0x04): Cooling mode flag

This ensures correct interpretation of all status codes, including transitional states:

Status CodeBinaryHVAC ActionDescription
00000 0000OffHeat pump is off
10000 0001IdleStarting up
30000 0011HeatingActively heating
50000 0101CoolingActively cooling
170001 0001IdleTransitional state
190001 0011HeatingHeating in transitional state
210001 0101CoolingCooling in transitional state
670100 0011HeatingHeating mode (defrosting?)
750100 1011HeatingHeating mode (defrosting + drying?)
830101 0011HeatingHeating mode

Current ToDo / development

There are many more telemetry and property values, that make sense to be offered by the integration. The ComfoClime unit itself is fully integrated but there are some missing sensors, switches and numbers of the ComfoAirQ unit to be added in the future. You are missing one? The definitions are in seperate files in the entities folder, so you can try them yourself. If they are working you can open an issue or directly open a pull request.

Feel free to participate! 🙋‍♂️

Thanks to...

@michaelarnauts and his integration of ComfoConnect, where I discovered a lot of telemetries and properties of the ventilation unit: https://github.com/michaelarnauts/aiocomfoconnect

Development

Releasing a New Version

This project uses automated release workflows that handle everything for you:

Creating a Stable Release

  1. Trigger the release workflow:
    • Go to Actions → Release workflow
    • Click "Run workflow"
    • Enter the version number (e.g., 2.1.0)
    • The workflow will automatically:
  • Update the version in custom_components/comfoclime/manifest.json
  • Update the version in pyproject.toml
    • Create a pull request with the version change
    • Auto-merge the PR (if branch protection allows)
    • Create and push a git tag
    • Generate a changelog from commits since the last tag
    • Create a GitHub release with the changelog

Creating a Pre-Release

Pre-releases are useful for beta testing new features before a stable release:

  1. Trigger the pre-release workflow:
    • Go to Actions → Pre-Release workflow
    • Click "Run workflow"
    • Enter the pre-release version number (e.g., 2.1.0b1)
    • Supported format: X.Y.ZbN
    • The workflow will automatically:
      • Update the version in custom_components/comfoclime/manifest.json
      • Update the version in pyproject.toml
      • Create a pull request with the version change
      • Auto-merge the PR (if branch protection allows)
      • Create and push a git tag
      • Generate a changelog from commits since the last tag
      • Create a GitHub pre-release with warning message

Note: The workflows create PRs for version updates to comply with branch protection rules. If auto-merge is enabled on the repository, the PRs will be merged automatically. Otherwise, you need to manually approve and merge the PR, then the release will be created.

Running Tests

The integration includes a comprehensive test suite covering all entity types. To run the tests:

# Install developer dependencies
uv sync --group dev
# Run all tests
uv run pytest tests/
# Run tests with coverage
uv run pytest tests/ --cov=custom_components/comfoclime --cov-report=html
# Run specific test file
uv run pytest tests/test_sensor.py -v

The test suite includes:

  • Unit tests for all entity types (sensor, switch, select, number, climate, fan)
  • API tests
  • Integration setup tests, including the config entry v1 → v2 migration
  • Conformance checks of the sensor definitions against the upstream protocol documentation (byte counts, signedness and scaling factors), so a wrong decode is caught rather than showing a plausible but wrong number
  • Consistency checks between entity definitions, the config flow and both translation files
  • Mock fixtures for testing without a real device

Tests are automatically run via GitHub Actions on push and pull requests.

Troubleshooting

Having issues with the integration? Check the "Bekannte Fallstricke" section in CLAUDE.md for common issues and solutions, including:

  • GitHub integration timeout errors (not related to ComfoClime)
  • Connection issues with the device
  • Entity update problems
  • Integration loading failures
  • Development environment issues

About

HomeAssistant integration of Zehnder ComfoClime

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages