A camera comprising: a first electrical component being configured to be shifted from a first state (10S1) to a second state (10S2), the second state (10S2) being associated with an increase in heat dissipation from the first electrical component compared to heat dissipation from the first electrical component in the first state (10S1), a second electrical component having a variable electrical power consumption, wherein the first electrical component and the second electrical component are at least partly arranged in an enclosure, the first electrical component and the second electrical component being configured to directly or indirectly dissipate heat to a first air volume inside the enclosure, and wherein the camera further comprises a controller arranged to temporarily decrease electrical power consumption of the second electrical component as the first electrical component is shifted to the second state (10S2), characterised in that a first portion of a material has the property of being capable of absorbing water molecules when being cooled and desorbing water when being heated, and a second portion of a material has the property of being capable of absorbing water molecules when being cooled and desorbing water when being heated, wherein the first and second portions (210, 220) are provided as a part of the enclosure and/or inside the enclosure, wherein the first portion is positioned nearby the first electrical component and remote from the second electrical component, and the second portion is positioned nearby the second electrical component and remote from the first electrical component, whereby the controller temporarily decreasing electrical power consumption of the second electrical component counteracts an increase in humidity of the first air volume inside the enclosure, the increase in humidity being induced by the first electrical component being shifted to said second state (10S2) and thereby heating the first portion of said material and counteracted by the second portion of said material being cooled and thereby absorbing water molecules from the first air volume. a first electrical component being configured to be shifted from a first state (10S1) to a second state (10S2), the second state (10S2) being associated with an increase in heat dissipation from the first electrical component compared to heat dissipation from the first electrical component in the first state (10S1), a second electrical component having a variable electrical power consumption, wherein the first electrical component and the second electrical component are at least partly arranged in an enclosure, the first electrical component and the second electrical component being configured to directly or indirectly dissipate heat to a first air volume inside the enclosure, and wherein the camera further comprises a controller arranged to temporarily decrease electrical power consumption of the second electrical component as the first electrical component is shifted to the second state (10S2), characterised in that a first portion of a material has the property of being capable of absorbing water molecules when being cooled and desorbing water when being heated, and a second portion of a material has the property of being capable of absorbing water molecules when being cooled and desorbing water when being heated, wherein the first and second portions (210, 220) are provided as a part of the enclosure and/or inside the enclosure, wherein the first portion is positioned nearby the first electrical component and remote from the second electrical component, and the second portion is positioned nearby the second electrical component and remote from the first electrical component, whereby the controller temporarily decreasing electrical power consumption of the second electrical component counteracts an increase in humidity of the first air volume inside the enclosure, the increase in humidity being induced by the first electrical component being shifted to said second state (10S2) and thereby heating the first portion of said material and counteracted by the second portion of said material being cooled and thereby absorbing water molecules from the first air volume.