A battery storage system is to be installed at Bristol's City Hall, with the aim of saving the council £16,000 a year on its electricity bill.
Bristol City Council currently pays a higher unit price during peak hours and less overnight when demand is lower.
It is hoped the £365,000 battery will help balance out electrical demand.
The council also says it could make up to £17,000 by trading energy back to its provider, Bristol Energy, of which the council is a stakeholder.
Loss-making Bristol Energy, set up in 2016, was initially expected to be in profit by 2019 but has since needed more than £37m investment from the city council.
The scheme is part of plans for the council to become carbon neutral by "significantly cutting" emissions from City Hall.
The idea is broadly supported by the industry group, the Association for Renewable Energy and Clean Technology (REA).
But council documents accept some of the future revenues from the scheme "are uncertain".
It says the battery can shift consumption away from the peak hours which are "the most carbon intensive" to produce electricity.
The council says by working with Bristol Energy it could use the battery to trade on the wholesale electricity market to gain income.
As the price of energy fluctuates, the battery system will store energy at its cheapest, which can then be sold back to the national grid when it has peaked at a higher price.
Frank Gordon, head of policy at REA, said it broadly welcomed the council's lead in installing "innovative technology" aimed at "net zero targets".
"As well as the energy purchase savings, such a project could benefit from revenue from the UK's 'Capacity Market' and regional and national electricity system balancing markets," he said.