Firefighters were called to a property at Beveridge Avenue, Mayfield, Midlothian, on Tuesday afternoon after it was hit by lightning.
Two people were in the house at the time and were checked over by ambulance staff as a precaution though no-one was injured.
The fire service said that the lightning bolt did not start a fire but caused “extensive roof damage” and five appliances were sent to the scene to make sure it was water-tight.
In Penicuik, flash flooding led to firefighters being called to homes to pump water out.
Schools and a leisure centre were also affected.
The Met Office issued a yellow ‘be aware’ weather warning for much of Scotland on Tuesday advising of the potential for “torrential downpours” with hail and thunderstorms.
Forecasters warned of travel disruption and flooding as up to 1.5 inches rain was predicted to fall in a few hours.