Node¶
A node is a point in your network that can produce and/or consume unlimited power at no cost. Use it to build a custom endpoint when no other element fits, and put the limits and prices on the connections to it.
Raw model element
Creating nodes requires Expose raw model elements to be enabled on your hub.
For a point where connections meet and power only passes through, such as a switchboard or a DC bus, use a junction instead.
Attach a node only through a limiting, priced connection
A node that can produce or consume power does so without any limit or price of its own. Connect it to the rest of your network only through connections that set a power limit and a price. Connections are one-way, so a node that both produces and consumes power needs a limited, priced connection in each direction. Without them, the optimizer can create free power from a source node or dump power for free into a sink node, and the resulting plan will not be physically meaningful.
Configuration¶
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| Name | String | Yes | - | Unique identifier for this node |
| Can produce unlimited power (source) | Boolean | No | false | Whether node can produce unlimited power |
| Can consume unlimited power (sink) | Boolean | No | false | Whether node can consume unlimited power |
See Where values are measured for the convention HAEO uses for where limits, prices, and reported power apply.
Name¶
Unique identifier for this node within your HAEO configuration. Used to identify the node in connection endpoints.
Choose descriptive names based on what the node represents: "Generator", "Neighbor Supply", "Dump Load"
Is source¶
Whether this node can produce power. When on, the node can supply any amount of power that flows out through its connections.
Default: off (node cannot produce power)
Is sink¶
Whether this node can consume power. When on, the node can absorb any amount of power that flows in through its connections.
Default: off (node cannot consume power)
Source and sink combinations¶
The combination of is_source and is_sink determines the node's behavior:
Source Only (is_source=true, is_sink=false):
- Node can produce power that flows out through connections
- Cannot accept power from connections
- Useful for modeling a power source without a dedicated generation or grid element
Sink Only (is_source=false, is_sink=true):
- Node can accept power that flows in through connections
- Cannot produce power
- Useful for modeling a power sink without a dedicated consumption element
Bidirectional (is_source=true, is_sink=true):
- Node can both produce and consume power
- Useful for modeling a flexible power exchange point
- Similar to a grid element, but the connections to and from it carry the limits and prices
Neither (is_source=false, is_sink=false):
- Power must balance, exactly like a junction
- Useful when you want to switch the node's role on and off at runtime through its input entities
- If the role never changes, use a junction instead
Node role and power policies
Source/sink switches also determine how power policies follow energy through the node.
A node that can produce or consume power can be chosen as a policy source or destination.
Sinks terminate a policy's provenance — a source=X → destination=Y rule cannot see past an intermediate sink.
See Node roles and policy scope for the full rules.
Configuration example¶
A backup generator modeled as a source node:
| Field | Value |
|---|---|
| Name | Generator |
| Can produce unlimited power (source) | On |
| Can consume unlimited power (sink) | Off |
Then add a connection from "Generator" to your switchboard with a maximum power matching the generator rating and a price matching its fuel cost per kWh.
Deleting nodes
Deleting a node leaves the connections and elements connected to it unchanged, and HAEO cannot plan until they connect to elements that exist. Add the node again with the same name to restore them, or reconfigure each of them to connect elsewhere.
Input entities¶
Each option creates an input entity on the node's device.
Input entities appear as Switch entities with the config entity category.
Their IDs combine the node's name with the entity's name.
Because they are entities, you can switch a node's role at runtime, for example from an automation.
| Input | Description |
|---|---|
switch.{name}_is_source |
Whether node can produce unlimited power |
switch.{name}_is_sink |
Whether node can consume unlimited power |
Input entities include a forecast attribute showing values for each optimization period.
See How data updates work for how input entities receive their values.
Sensors created¶
Sensor summary¶
A Node element creates 1 device in Home Assistant with the following sensors.
| Sensor | Unit | Description |
|---|---|---|
sensor.{name}_power_balance_shadow_price |
$/kWh | Local energy price at this node |
Power balance shadow price¶
Displayed as "Power balance shadow price". The marginal cost or value of power at this node. It is interpreted the same way as the junction power balance sensor. See the Shadow Prices modeling guide for general shadow price concepts.
All sensors include a forecast attribute containing future optimized values for upcoming periods.
Troubleshooting¶
Unexpectedly cheap or profitable plan: A source or sink node is connected without a power limit or price. Add a limit and a price to every connection to or from the node.
Infeasible optimization: Check all elements connected, connection directions correct, limits not too restrictive.
Next steps¶
-
Configure connections
Set the limits and prices on the connections to your node.
-
Junctions
Add a point where connections meet and power only passes through.
-
Node modeling
Understand the source, sink, and power balance formulation at nodes.