Repository navigation
Feature System
Each feature is a self-contained module that provides specific functionality. Features follow a consistent structure and can be enabled/disabled independently.
The hello_world feature is intended as a template for new development.
- Registration: feature is listed in
AVAILABLE_FEATURESin the rootconst.py. - Discovery: config flow discovers available features.
- Activation: user enables/disables features via the integration options.
- Creation: the framework imports the feature module and creates a feature instance.
- Registration: feature platforms are registered with Home Assistant.
- Operation: the feature runs independently (entities, services, automations, cards).
- default - Always enabled, provides shared functionality
- humidity_control - Humidity-based ventilation with balance mode
- co2_control - CO2-based ventilation for air quality
- sensor_control - Central sensor mapping, resolution, and zone configuration
- hvac_fan_card - Advanced control interface card
- ramses_debugger - Debugging tools and traffic analysis
- hello_world - Developer template/example feature
Each feature exposes a FEATURE_DEFINITION dict in features/<feature_id>/const.py.
This is the single source of truth for feature metadata consumed by the framework.
The feature registry reads FEATURE_DEFINITION to register, among other things:
- entity configs (per platform)
- device-to-entity mappings
- WebSocket command metadata
- card metadata
Avoid adding parallel const structures (for example: FEATURE_WEB_CONFIGS,
<FEATURE>_CONFIG, <FEATURE>_CARD_CONFIG).
Each feature has a predictable structure. Some parts are optional depending on what the feature needs.
Required:
-
__init__.pyfeature factory functions -
const.pyfeature constants and feature definition
Optional:
-
automation.pyPython automation logic (no YAML automation rules) -
services.pyservice implementations -
entities.pyfeature entity orchestration/helpers -
config.pyfeature-specific configuration manager -
platforms/platform implementations for Home Assistant entities -
www/JavaScript Lovelace cards and editors -
websocket_commands.pyWebSocket command handlers
The hello_world feature can be used as a template.
High-level steps:
- Copy
custom_components/ramses_extras/features/hello_world/tocustom_components/ramses_extras/features/<your_feature_id>/. - Register the feature in
AVAILABLE_FEATURESin the rootconst.py. - Add an options-flow step in
config_flow.py(typically a method namedasync_step_feature_<your_feature_id>()). - Restart Home Assistant, enable the feature in the options flow, and verify:
- entities are created
- services work
- cards load (if applicable)
- logs look clean
Back to: Home Prev: System Architecture Next: Framework Foundation
- Feature Catalog
- CO2 Control
- Humidity Control (Balance)
- Temp Control (Bypass)
- FAN Configuration (Sensor Control)
- HVAC Fan Card
- Ramses Debugger
-
Device Simulator -
⚠️ Use only on dedicated system/container - Default Feature
- Hello World (Developer Example)