con un clic
create-integration
Create a new meter or charger integration for the EVSE Load Balancer
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Create a new meter or charger integration for the EVSE Load Balancer
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
| name | create-integration |
| description | Create a new meter or charger integration for the EVSE Load Balancer |
| user-invocable | true |
| argument-hint | <meter|charger> <name> [--github-source <url>] [--non-interactive] |
Creates a new meter or charger integration with implementation, factory registration, and tests.
Prompts user for missing details. Used when called manually via /create-integration.
--non-interactive)Auto-infers all parameters from upstream source code. Used in GitHub Actions workflows where no user interaction is possible.
Behavior in non-interactive mode:
AskUserQuestionExtract from $ARGUMENTS:
meter or charger (required)Failure handling:
Ask the user for the following. Present as a numbered list they can answer in one message:
For both meters and chargers:
https://github.com/home-assistant/core/blob/dev/homeassistant/components/wallbox)For meters: 5. What sensor data is available per phase? Options:
active_power_l1_w, active_voltage_l1_vFor chargers: 5. Status entity identifier and all possible status values. Group them by:
domain="easee", service="set_charger_dynamic_limit", service_data={"device_id": ..., "current": ...}Do NOT ask the user anything. Instead, proceed directly to Step 3 to auto-infer parameters.
Use the provided GitHub URL to read the upstream integration's source code.
Analyze sensor.py to extract:
Analyze sensor.py, switch.py, number.py to extract:
Non-Interactive Auto-Inference:
Infer the following automatically from source code analysis:
Domain: Extract from GitHub URL path (e.g., /components/wallbox/ → wallbox)
Communication method:
mqtt dependency → MQTT-basedzigbee2mqtt or Z2M references → Zigbee2MQTTMQTT manufacturer: If MQTT, search for MANUFACTURER constant or device info dict
Entity lookup strategy: Analyze unique_id generation:
f"{unique_id}_{sensor_type}" → key suffix strategytranslation_key field → translation_key strategyMeters - sensor data format:
Chargers - status values: Extract all STATE_* constants or string literals used in status sensor
Chargers - service call: Search for service registration in switch.py or number.py, extract domain, service name, and service_data schema
Chargers - per-phase support: Default to False (single value) unless code shows per-phase arrays
Failure Handling (Non-Interactive):
If any critical parameter cannot be inferred:
"INFERENCE_FAILED: Could not determine <parameter> from source code. Manual intervention required."If inference is uncertain but plausible:
Read the closest existing implementation for reference:
custom_components/evse_load_balancer/meters/homewizard_meter.py (key suffix, power+voltage)custom_components/evse_load_balancer/meters/dsmr_meter.py (translation_key, consumption+production)custom_components/evse_load_balancer/meters/tibber_meter.py (key suffix, direct current)custom_components/evse_load_balancer/chargers/easee_charger.py (HA services, translation_key)custom_components/evse_load_balancer/chargers/lektrico_charger.py (HA services, key suffix)custom_components/evse_load_balancer/chargers/amina_charger.py (MQTT/Z2M)Also read:
custom_components/evse_load_balancer/const.py__init__.pycustom_components/evse_load_balancer/config_flow.pyCreate the implementation following .claude/rules/integration-patterns.md:
custom_components/evse_load_balancer/<meters|chargers>/<name>_<meter|charger>.pyconst.py domain constant + SUPPORTED_METER_DEVICES or filter list__init__.py import + branch/list entryconfig_flow.py _charger_device_filter_list (chargers only)tests/<meters|chargers>/test_<name>_<meter|charger>.pytests/meters/test_meter_factory.py (meters only)Run linting and tests:
ruff check custom_components/evse_load_balancer/
pytest tests/<meters|chargers>/test_<name>_<meter|charger>.py -v
Fix any failures.
On Success:
STATUS: SUCCESS
TYPE: <meter|charger>
NAME: <name>
DOMAIN: <domain>
FILES_CREATED:
- custom_components/evse_load_balancer/<type>s/<name>_<type>.py
- tests/<type>s/test_<name>_<type>.py
FILES_MODIFIED:
- custom_components/evse_load_balancer/const.py
- custom_components/evse_load_balancer/<type>s/__init__.py
- <additional files>
INFERRED_PARAMETERS:
- domain: <value>
- communication_method: <standard|mqtt|zigbee2mqtt>
- entity_lookup_strategy: <key_suffix|translation_key|unique_id>
- <additional inferred params>
ASSUMPTIONS:
⚠️ <any assumptions made with uncertain confidence>
NEXT_STEPS:
- Run tests to verify implementation
- Test with actual hardware
- Verify entity mappings match your HA device
On Failure:
STATUS: FAILED
ERROR_CODE: <MISSING_REQUIRED_ARGS|INFERENCE_FAILED|VALIDATION_FAILED>
ERROR_MESSAGE: <detailed message>
MISSING_PARAMETERS: <list of parameters that couldn't be inferred>
MANUAL_ACTION_REQUIRED: <specific steps for human to complete>
Error codes:
MISSING_REQUIRED_ARGS: Type or name not providedINFERENCE_FAILED: Could not infer critical parameters from source codeVALIDATION_FAILED: Tests or linting failed after implementation