-
-
Notifications
You must be signed in to change notification settings - Fork 16
Services Reference
PowerSync services are battery-agnostic where possible. Brand-specific control is routed through the configured coordinator, so most automations should use the generic power_sync.* services instead of brand names.
| Service | Description | Parameters |
|---|---|---|
power_sync.sync_tou_schedule |
Manually refresh Time-of-Use tariff prices. Tesla systems upload the schedule; Modbus systems store it for PowerSync display and optimization | None |
power_sync.sync_now |
Refresh provider and battery data immediately | None |
| Service | Description | Parameters |
|---|---|---|
power_sync.force_charge |
Force battery charge from grid for a timed window |
duration optional, minutes, default 30; power_w optional, 0/omitted uses the inverter default |
power_sync.force_discharge |
Force battery discharge/export for a timed window |
duration optional, minutes, default 30; power_w optional, 0/omitted uses the inverter default |
power_sync.hold_battery_soc |
Hold the battery around its current SOC and block normal charge/discharge where the hardware supports it |
duration optional, minutes, default 30 |
power_sync.set_self_consumption |
Put the battery into self-consumption mode | None |
power_sync.restore_normal |
Cancel force/hold/self-consumption overrides and return to normal operation | None |
Coverage notes:
- Force charge/discharge routes through Tesla, Sigenergy, Sungrow, FoxESS, GoodWe, AlphaESS, Solax Hybrid, ESY Sunhome, SAJ H2/HS2, and Fronius Reserva where the configured hardware supports the action.
- Neovolt / Bytewatt is also supported when the upstream Neovolt integration exposes dispatch mode, power, duration, charge target, and discharge cutoff entities.
-
power_wis best-effort. ESY Sunhome is mode-only, and SAJ H2/HS2 uses a percentage of rated power through the upstream SAJ integration. -
hold_battery_socis strongest on Modbus systems with a standby/backup mode. Tesla and AlphaESS are best-effort; solar surplus can still move SOC. - Force charge/discharge state is persisted across Home Assistant restarts. If a timed force mode is still valid after restart, PowerSync restores the mode and its expiry timer; if it expired during downtime, PowerSync restores normal operation.
| Service | Description | Parameters |
|---|---|---|
power_sync.set_backup_reserve |
Set the hardware backup reserve / minimum SOC |
percent required, 0-100 |
Supported reserve writes: Tesla Powerwall, Sigenergy, Sungrow, FoxESS, GoodWe, Solax Hybrid, Fronius Reserva, and Neovolt / Bytewatt when the upstream reserve/cutoff entity exists. ESY Sunhome and SAJ H2/HS2 do not expose backup reserve control, so the call is logged as a no-op for those systems.
Tesla currently rejects reserve values from 81-99%; PowerSync clamps those requests to 100%.
| Service | Description | Parameters |
|---|---|---|
power_sync.set_operation_mode |
Set Powerwall operation mode |
mode: autonomous, self_consumption, or backup
|
power_sync.set_grid_export |
Set Powerwall grid export rule |
rule: never, pv_only, or battery_ok
|
power_sync.set_grid_export_auto |
Restore Tesla's grid export rule from PowerSync's preferred automatic behavior | None |
power_sync.set_grid_charging |
Enable or disable grid charging |
enabled boolean |
power_sync.set_storm_watch |
Enable or disable Storm Watch when the site supports it |
enabled boolean |
power_sync.set_off_grid_ev_reserve |
Set the battery percentage reserved for EV charging during an outage |
percent required, 0-100 |
power_sync.set_vpp_enrollment |
Enroll or unenroll from a Tesla grid-services program |
program_id, enrolled boolean |
power_sync.schedule_max_backup |
Raise backup reserve to 100% for a fixed window, then restore the previous reserve |
duration_minutes required, 1-1440 |
power_sync.refresh_calibration |
Clear PowerSync's local Powerwall calibration guard after a calibration cycle | None |
| Service | Description | Parameters |
|---|---|---|
power_sync.powerwall_go_off_grid |
Physically disconnect from grid using local Powerwall control |
bypass_soc_check optional boolean; mode optional advanced TEDAPI mode override |
power_sync.powerwall_reconnect_grid |
Reconnect to grid | None |
power_sync.powerwall_verify_pairing |
Verify the stored local pairing key | None |
Local off-grid control requires completed gateway pairing. Powerwall 3 uses signed TEDAPI commands; Powerwall 2 uses the local gateway path.
See Battery System Setup for the full pairing process, including the 2-minute DC-isolator toggle window and re-pair confirmation behavior.
When a Tesla site is configured, PowerSync also exposes helper entities for local control:
| Entity | Purpose |
|---|---|
| Pair Powerwall Gateway button | Starts local Powerwall gateway pairing. Re-pairing requires a second press within 30 seconds. |
| Unpair Powerwall Gateway button | Clears the stored local key after a two-press confirmation. |
switch.power_sync_off_grid |
Calls local off-grid / reconnect services and reflects the actual island state when local data is available. |
| Powerwall Local Paired binary sensor | Shows whether local pairing is complete |
| Powerwall Gateway IP Missing binary sensor | Flags Tesla sites that need a local gateway IP before local controls can work |
| Powerwall Off-Grid binary sensor | Mirrors the local island/on-grid state when available |
| Service | Description | Parameters |
|---|---|---|
power_sync.curtail_inverter |
Manually curtail the configured AC-coupled inverter |
mode optional: load_following default or shutdown
|
power_sync.restore_inverter |
Restore the configured AC-coupled inverter to normal operation | None |
Automatic curtailment uses the configured AC inverter settings and current price/load data. Manual load_following mode passes home load to controllers that support it; unsupported paths fall back to zero export or native curtailment behavior.
| Service | Description | Parameters |
|---|---|---|
power_sync.get_calendar_history |
Return battery energy history for the mobile app |
period optional: day, week, month, or year
|
power_sync.sync_battery_health |
Update Tesla battery-health data from a mobile TEDAPI scan or capacity blueprint |
original_capacity_wh, current_capacity_wh, degradation_percent; optional battery_count, scanned_at
|
get_calendar_history supports service responses in Home Assistant versions that expose response data from service calls.
These are Home Assistant entities, not Developer Tools services, but they are part of PowerSync's control surface:
| Entity | Description |
|---|---|
switch.power_sync_auto_sync |
Automatically refreshes tariff prices. Tesla sites show this as Auto-Sync TOU Schedule because the schedule is uploaded to the Powerwall; non-Tesla systems show Auto-Sync Tariff Prices because PowerSync stores the prices for display and optimization |
select.power_sync_force_charge_duration |
Default duration used by force-charge controls |
select.power_sync_force_discharge_duration |
Default duration used by force-discharge controls |
number.power_sync_force_power_kw |
Preferred manual force charge/discharge power target in kW; 0 uses inverter/BMS maximum |
switch.power_sync_optimization_enabled |
Turns Smart Optimization on or off without deleting saved optimizer settings |
switch.power_sync_monitoring_mode |
Blocks battery and inverter write commands while still allowing prices, sensors, forecasts, and plans to update |
switch.power_sync_auto_update |
Enables PowerSync's HACS update automation; configure the update time in Configure > PowerSync auto-update |
switch.power_sync_away_mode |
Makes the load forecaster recover from holiday/low-load periods |
switch.power_sync_profit_max_mode |
Uses the more aggressive LP terminal value profile for strong export windows |
switch.power_sync_optimization_spread_export |
Smooths planned battery export across eligible export windows when supported |
switch.power_sync_optimization_spread_import |
Smooths planned grid charging across same-price import windows when supported |
Tesla sites also expose number/select/switch/binary entities for backup reserve, off-grid EV reserve, operation mode, grid export rule, grid charging, Storm Watch, VPP program enrollment, manual export override, grid-services status, permission-to-operate, active Powerwall alerts, and calibration state when the site supports them.
The mobile app's Automations engine also exposes actions such as Enable Optimizer, Disable Optimizer, AEMO spike export, EV charging actions, and grid-status workflows. These are PowerSync automation actions, not separate Home Assistant Developer Tools services.