Non-grid-tied batteries

The default assumption in HA is that batteries are grid-tied and can service any device in the home. This leads to huge untracked consumption if you have a battery in series with a load (IE grid -> battery charger -> inverter -> load).

To fix this there needs to be an option to select a battery as an upstream device when configuring individual loads, and to give the battery an option to put it downstream of something (IE the main panel)

I have several loads which are only powered from batteries. Those batteries have both grid and solar inputs but cannot backfeed. There is significant untracked consumption in the inverter losses which are identified as untracked consumption from the grid, as well as inaccuracies in the sankey due to the incorrect dependency tree.