Check the data sheet or user manual for your equipment or battery, but generally batteries should be stored indoors at a human comfortable temp and humidity.
Ryobi really needs a better URL for their manuals to be stored at. If the direct link to the file sketches you out, for the moment at least this, this link will lead to the same file:
Do not store or charge battery packs in locations
where the temperature is less than 50°F or more than
100°F
But it also says
The lithium-ion battery pack can be used in temperatures down to –4°F. Put the battery pack on a tool and use the tool in a light duty application. After about a minute, the pack will warm up and begin operating normally.
And
A cold battery pack may be placed directly onto the charger port but charging will not begin until the battery temperature warms to within acceptable temperature range. When a cold battery pack is placed on the charger, the charger may indicate the pack is not ready to charge. Please refer to charger operator’s manual. When the battery pack warms to approximately room temperature the charger will automatically begin charging
Heat is the killer for car batteries too; much to my surprise, I had to buy far more in south Texas than upstate New York. Cold makes batteries less capable, but heat accelerates degradation dramatically.
I kept mine out in the cold and one of them died. These are ego batteries so replacing them is very expensive. I now store them inside in cold seasons.