Skip to content

Services Reference

bolagnaise edited this page Apr 4, 2026 · 18 revisions

Services Reference

Core Services

Service Description Parameters
power_sync.sync_tou_schedule Manually sync TOU tariff to battery None
power_sync.sync_now Refresh data from provider and battery None

Battery Control

Service Description Parameters
power_sync.force_charge Force charge from grid duration_minutes (required)
power_sync.force_discharge Force discharge to grid duration_minutes (required)
power_sync.restore_normal Restore normal battery operation None

Tesla Powerwall Settings

Service Description Parameters
power_sync.set_backup_reserve Set backup reserve percentage backup_reserve (0-100)
power_sync.set_operation_mode Set operation mode mode (autonomous, self_consumption, backup)
power_sync.set_grid_export Set grid export behaviour export (everything, pv_only, never)
power_sync.set_grid_charging Enable/disable grid charging enabled (true/false)

Dual Powerwall: If you have a dual Powerwall setup, all services above — including force charge, force discharge, restore normal, TOU sync, and all settings — are automatically applied to both gateways. No additional configuration is needed.

Sungrow Battery Control

Service Description Parameters
power_sync.sungrow_force_charge Force charge from grid duration_minutes (optional)
power_sync.sungrow_force_discharge Force discharge to grid duration_minutes (optional)
power_sync.sungrow_restore_normal Restore self-consumption mode None
power_sync.sungrow_set_backup_reserve Set backup reserve percentage percent (0-100)
power_sync.sungrow_set_charge_rate Set max charge rate kw (kilowatts)
power_sync.sungrow_set_discharge_rate Set max discharge rate kw (kilowatts)
power_sync.sungrow_set_export_limit Set grid export limit watts (0 to disable)

Sigenergy Control (v2.5.0+)

Service Description Parameters
power_sync.sigenergy_force_charge Force charge battery from grid duration_minutes (optional)
power_sync.sigenergy_force_discharge Force discharge battery to grid (ESS mode) duration_minutes (optional)
power_sync.sigenergy_restore_normal Restore Maximum Self Consumption mode None

Note: Force discharge uses Remote EMS DISCHARGE_ESS mode with active power targeting for full grid export. Backup reserve is saved before force modes and restored on restore_normal.

FoxESS Control (v2.5.0+)

Service Description Parameters
power_sync.foxess_force_charge Force charge from grid via remote control duration_minutes (optional), power_w (optional)
power_sync.foxess_force_discharge Force discharge to grid via remote control duration_minutes (optional), power_w (optional)
power_sync.foxess_restore_normal Clear remote control, restore work mode None
power_sync.foxess_set_work_mode Set inverter work mode mode (self_use, feed_in, backup)
power_sync.foxess_set_min_soc Set minimum SOC / backup reserve percent (0-100)

Note: The power_w parameter sets the force mode power setpoint. If omitted, the inverter's maximum charge/discharge current is used. H3-Pro/Smart use Grid targeting (0x0009) for force discharge.

Optimizer Control (v2.5.0+)

Service Description Parameters
power_sync.enable_optimizer Enable the LP optimizer None
power_sync.disable_optimizer Disable the LP optimizer None

These can be used in automations — for example, disable the optimizer during a manual force charge and re-enable it afterwards.

AC Inverter Curtailment

Service Description Parameters
power_sync.curtail_inverter Manually curtail AC inverter to zero export None
power_sync.restore_inverter Restore AC inverter to normal operation None

Data Services

Service Description Parameters
power_sync.get_calendar_history Get energy history (for mobile app) start_date, end_date
power_sync.sync_battery_health Sync battery health data (Tesla TEDAPI / blueprint). Not needed for Sungrow, Sigenergy, or GoodWe — SOH is read automatically. None

Clone this wiki locally