-- Volitelný tvrdý strop proudu pro Modbus reg 108/109 (Deye může firmwarem oříznout pod W-odvozeným max, např. 351→350 A).
ALTER TABLE ems.asset_inverter
    ADD COLUMN IF NOT EXISTS deye_register_max_charge_a INT NULL,
    ADD COLUMN IF NOT EXISTS deye_register_max_discharge_a INT NULL;

COMMENT ON COLUMN ems.asset_inverter.deye_register_max_charge_a IS
    'Optional cap for holding reg 108 (A); NULL = use only LEAST(W)/51.2 derived max.';
COMMENT ON COLUMN ems.asset_inverter.deye_register_max_discharge_a IS
    'Optional cap for holding reg 109 (A); NULL = use only derived max.';
