You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(teslemetry): model Powerwalls as AC coupled, publish site_info
Tesla Powerwall batteries are AC coupled, but nothing in the Teslemetry
component or the TESLA inverter type set inverter_hybrid, so it stayed at
Predbat's default of on.
That matters because of how the two settings combine. Teslemetry publishes
inverter_limit from site_info, and max_site_meter_power_ac is usually the 1e9
"unlimited" sentinel, so it falls back to nameplate_power - the Powerwall's own
AC rating (5 kW on a PW2). With inverter_hybrid on, get_total_inverted() folds
pv_ac into the same budget, so that 5 kW became a cap on battery + PV combined
and a separately inverted solar array was modelled as clipping against a limit
it never passes through.
On a reported site (13.5 kWh PW2, solar measured at 24 kW, 48.6 kWh exported in
one day) that invented 17.7 kWh of clipping and, with it, a 05:00-10:00 export
window whose only purpose was to "recover" the phantom clipped solar. Turning
inverter_hybrid off takes clipping to 0.00 kWh and the morning export window
disappears; the plan keeps only its genuine overnight exports.
The nameplate_power fallback itself is left alone - it is correct once hybrid is
off, because a non-hybrid inverter_limit caps only the battery path, which is
exactly the Powerwall's rating (and 11.5 kW on a PW3).
Also publishes site_info as sensor.<prefix>_teslemetry_site_info so the device's
own view of the site - capacity, AC rating, coupling, export rule - is reviewable
without reading a debug log. The response is republished wholesale rather than as
a hand-picked subset, so future firmware fields appear without a code change and
nothing is lost to a wrong guess about nesting (batteries,
customer_preferred_export_rule and net_meter_mode all live under components). The
large tariff blobs are dropped, the same ones _summarize_for_log already hides.
Supporting refactor: set_state_external moves onto ComponentBase, so components
call self.set_state_external() instead of reaching through
self.base.ha_interface. All 11 call sites across teslemetry, gecloud, web and
web_mcp are migrated, the shared MockBase gains an ha_interface so the standalone
CLI harnesses no longer crash on a component that auto-configures a Predbat
setting, and GECloud's now-redundant local MockHAInterface is removed.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments