Repository navigation
Framework Foundation
Willem edited this page Jan 24, 2026
·
4 revisions
The framework provides reusable components, standardized patterns, and automated lifecycle management so features can focus on domain logic.
The framework is layered:
- Base classes
- Helpers
- Services
- Card system + asset deployment
The setup framework (in custom_components/ramses_extras/framework/setup/) orchestrates
initialization phases in a strict order and manages dependencies.
Key modules:
-
entry.py(entry point + pipeline orchestrator) -
features.py(feature loading and instance creation) -
devices.py(device discovery/coordination + cleanup) -
cards.py(asset deployment and card registration) -
utils.py,yaml.py(helpers and YAML-to-config-flow bridge)
- Entry setup
- initialize
hass.data - start entity-registry monitoring
- initialize
- Main setup pipeline
- load feature definitions + import feature platforms
- discover devices and coordinate entity setup with ramses_cc
- deploy frontend assets and expose frontend configuration
- register services and WebSocket commands
- validate entities and cleanup orphaned devices
- create and start feature instances
- Configuration updates
- reload entry when options change
- refresh frontend config and feature enablement state
- Orchestration: each phase runs in the correct order.
- Modularity: setup code is split by domain (features/devices/cards).
- Robustness: retry logic and cleanup for reliable startup.
- Flexibility: supports primary config flow and secondary YAML bootstrap.
- Real-time: monitors for updates and pushes runtime changes to the frontend.
Once a config entry exists, configuration priority is:
- Runtime data
- Config entry (data/options)
- YAML (only as initial bootstrap)
-
ExtrasBaseEntity(custom_components/ramses_extras/framework/base_classes/base_entity.py)- Base for custom entities.
-
ExtrasBaseAutomation(custom_components/ramses_extras/framework/base_classes/base_automation.py)- Base for Python automation classes.
- Platform entity classes (
custom_components/ramses_extras/framework/base_classes/platform_entities.py)-
ExtrasSensorEntity,ExtrasSwitchEntity,ExtrasNumberEntity,ExtrasBinarySensorEntity.
-
-
RamsesBaseCard(custom_components/ramses_extras/framework/www/ramses-base-card.js)- Shared base for shipped Lovelace cards.
Common helper areas:
-
custom_components/ramses_extras/framework/helpers/config/configuration management patterns -
custom_components/ramses_extras/framework/helpers/entity/entity lifecycle helpers, including:SimpleEntityManagerDeviceFeatureMatrix
-
custom_components/ramses_extras/framework/helpers/service/service registration/validation -
custom_components/ramses_extras/framework/helpers/commands/command registry -
custom_components/ramses_extras/framework/helpers/device/device filtering + helpers
- Path management (
custom_components/ramses_extras/framework/helpers/paths.py+custom_components/ramses_extras/framework/www/paths.js) - Message system:
- WebSocket command registration
- ramses_cc message listeners + event patterns
Examples include:
- configuration management
- platform entities
- service framework
Back to: Home Prev: Feature System Next: Device Feature Management
- Feature Catalog
- CO2 Control
- Humidity Control (Balance)
- Temp Control (Bypass)
- FAN Configuration (Sensor Control)
- HVAC Fan Card
- Floorplan Helper
- Ramses Debugger
-
Device Simulator -
⚠️ Use only on dedicated system/container - Default Feature
- Hello World (Developer Example)