Repository navigation
Hello World
A template feature demonstrating complete Ramses Extras architecture.
The Hello World feature serves as a reference implementation for developers who want to create new features. It demonstrates all standard components of a Ramses Extras feature while keeping the code small and readable.
The Hello World feature shows all standard components:
- Automation logic – Python-based automation using framework base classes
- Configuration management – Integration with options flow and validation
- Entities – Sensor, switch, number, and binary_sensor implementations
- Services – Custom services for feature control
- Platform implementations – Device iteration and entity creation
- Lovelace card – Custom card with editor configuration
- WebSocket commands – Real-time communication with frontend
The template demonstrates these architectural best practices:
- Define entity templates and metadata in
features/<feature_id>/const.pyviaFEATURE_DEFINITION - Avoid duplicating configuration structures
- Use
framework.helpers.platform.PlatformSetupto avoid duplicating device iteration patterns - Use
framework.helpers.device.core.find_ramses_device()/get_device_type()for device filtering - Use
framework.helpers.entity.core.EntityHelpersto generate entity IDs from templates
- Feature entities should add feature-specific attributes/behavior
- Common state handling should live in framework base classes
- Do not introduce new ad-hoc
*_CONFIGS/*_CARD_CONFIGregistries - Keep everything within
FEATURE_DEFINITION
- Copy the
hello_worldfolder:
cd /path/to/ramses_extras/custom_components/ramses_extras/features
cp -r hello_world your_new_feature- Rename files and update references:
- Replace
hello_worldwith your feature name in filenames - Update class names and imports
- Update the feature ID in
const.py
- Prune what you don't need:
- The template exercises every layer – remove unused components
- Keep only what your feature actually needs
- Implement your feature logic:
- Add your automation logic in the automation module
- Configure entities as needed
- Add WebSocket commands if required
- Enable the feature in the options flow for testing
- Use the template entities to verify setup
- Gradually replace template logic with your feature logic
- Remove unused components as you go
The Hello World feature is configured through the standard Ramses Extras options flow:
- Go to Settings → Integrations
- Find Ramses Extras and click Configure
- Enable Hello World for your devices
- Configure feature-specific options
The feature creates these example entities (per device):
| Entity | Type | Purpose |
|---|---|---|
sensor.hello_world_{device_id} |
Sensor | Example sensor entity |
switch.hello_world_{device_id} |
Switch | Example switch entity |
number.hello_world_{device_id} |
Number | Example number entity |
binary_sensor.hello_world_{device_id} |
Binary Sensor | Example binary sensor |
The feature provides these example services:
-
hello_world.say_hello– Example service that logs a message -
hello_world.set_value– Example service that updates the number entity
These commands are available for frontend communication:
-
hello_world/get_status– Get current feature status -
hello_world/send_message– Send a message to the feature
The feature includes a custom Lovelace card:
type: custom:hello-world-card
entity: sensor.hello_world_32_153289The card demonstrates:
- Real-time updates via WebSocket
- Configuration editor
- Theme adaptation
- Entity state display
Use Hello World to learn:
- Feature Structure – How files are organized
- Entity Creation – How to create and manage entities
- Automation – How to implement automation logic
- Configuration – How to handle user configuration
- Frontend Integration – How to create custom cards
- Feature System – Architecture overview
- Framework Foundation – Helper classes and utilities
- Entity Management – Entity creation and management
- Frontend Architecture – Card development guide
Back to: Home | Prev: Default Feature | Next: HVAC Fan Card
- 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)