Repository navigation
System Architecture
┌────────────────────────────────────────────────────────────┐
│ Home Assistant │
├────────────────────────────────────────────────────────────┤
│ Ramses Extras Integration (Thin HA Wrapper) │
├────────────────────────────────────────────────────────────┤
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Feature 1 │ │ Feature 2 │ │ Feature N │ │
│ │ (Humidity) │ │ (HVAC Card) │ │ (Custom) │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
├────────────────────────────────────────────────────────────┤
│ Framework Foundation (Base Classes, Helpers, Managers) │
├────────────────────────────────────────────────────────────┤
│ ramses_cc Integration (Device Communication) │
└────────────────────────────────────────────────────────────┘
- Each feature is self-contained (automation, services, entities, config, cards).
- Features are modular: enabling a feature does not require enabling all others.
- A default feature provides shared/common functionality.
- Shared base classes for entities and automations.
- Reusable helpers for setup, config flows, registry operations, shared fan-control policy, and diagnostics.
- Automations are implemented as Python classes.
- They listen to ramses_cc events and device state changes.
- FAN-related automations publish demand to the shared fan-speed arbiter instead of directly owning final fan state.
- Broker access for device communication.
- Event subscriptions (real-time message handling).
- Shared constants and schemas.
- Standard HA platforms (sensor/switch/binary_sensor/number).
- Type-safe entity implementations.
- Shared diagnostics from the default feature for FAN devices.
At a high level, the repo is split into:
-
custom_components/ramses_extras/integration entry points and platform files -
custom_components/ramses_extras/features/feature-centric modules -
custom_components/ramses_extras/framework/reusable foundation
The main setup pipeline is orchestrated by the setup framework in
custom_components/ramses_extras/framework/setup/.
-
Early entry setup (
async_setup_entry)- Initializes
hass.datastate - Watches the entity registry for new ramses_cc entities
- Initializes
-
Main setup pipeline
- Load feature definitions + import enabled feature platform modules
- Discover devices and coordinate
async_setup_platformswith ramses_cc - Setup WebSocket integration
- Deploy Lovelace card assets + expose frontend config
- Register services
- Validate entities + cleanup orphaned devices
- Create and start feature instances (automation lifecycle)
When options change, the integration reloads and:
- updates runtime state derived from config entry options
- refreshes frontend configuration
- re-evaluates device/feature selections and entity requirements
This allows a UI-driven workflow without relying on YAML automations.
YAML is not the primary configuration method.
If present, YAML is only used as a secondary bootstrap mechanism to create an initial config entry. After that, the config entry (and its options) become authoritative.
Frontend card assets are deployed under versioned directories in
/config/www/ramses_extras/v{version}/..., while the Lovelace bootstrap
resource uses a stable path with a cache-busting query string:
/local/ramses_extras/helpers/main.js?v=<version>
This keeps browser caching predictable without requiring users to update the resource URL on every release.
Device discovery is coordinated with ramses_cc:
- Prefer direct broker/device access where possible.
- Fall back to entity-registry based extraction when needed.
- Emit/handle discovery signals so platform setup happens only when devices are ready for entity creation.
Ramses Extras depends on ramses_cc being available and ready.
- It will wait/retry if ramses_cc has not finished loading.
- Device discovery prefers direct broker access and falls back to registry-based extraction.
Since ramses_cc Phase 4 (config entry version 3), the schema is the sole
source of truth for device topology and traits. The legacy known_list and
enforce_known_list config entry options have been removed:
-
enforce_known_listis always on — hardcoded in the coordinator -
known_listis derived at runtime from the schema via_derive_known_list_from_schema()— not stored in the config entry - Device traits (_class, _alias, _faked, _bound, _scheme, _disabled, _owner) live as _-prefixed keys inside device entries in the schema
- Devices are added to the schema via the passive scan discovery flow (scan detects new devices, user accepts them in the ramses_cc UI) or by manual editing in the schema editor
- The v2→v3 config entry migration merges legacy
known_listtraits into the schema automatically and enables passive scan
The schema structure includes:
-
main_tcs— the primary controller ID - Per-device entries with
_-prefixed traits and structural keys (zones,remotes,sensors,stored_hotwater,system) -
orphans_heat/orphans_hvac— lists of device IDs not yet placed in the topology - _owner (root-level) — system owner name; devices with a different _owner are "foreign" (excluded from known_list, added to block_list)
ramses_extras reads the schema from ramses_cc's config entry options when needed (e.g., the device simulator's profile loader writes and clears it during test setup).
Startup is dependency-aware:
- Ramses Extras expects ramses_cc to be loaded before doing full discovery.
- When ramses_cc is not ready yet, setup is delayed and retried.
- This prevents half-initialized features and missing device contexts.
For FAN-related features you typically need the Ramses RF bound REM mapping. See:
Back to: Home Prev: FAN Configuration (Sensor Control) Next: Feature System
- 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)