Image caption Alex Milsom says he cannot unscrew the box and there is no access to it from the side

On Saturday afternoon, the hot water went off in Alex Milsom's shared house in west London. Discussing the problem with his housemates on WhatsApp, one person replied: "It's because there's a cage on the thermostat."

"I said I would put the water back on, but obviously I couldn't get past the new lock box," Alex said.

His landlady had visited the property to install a clear thermostat cover over the Google Nest thermostat - which can control heating and hot water.

"We have no idea what the temperature is," he said. "The Nest screen only lights up when you stand up close to it, but the box has stopped that from working and we can't see the number."

Alex, 21, has been living with six or seven others in a semi-detached house in Ealing since August. Rented from a private landlady, he pays £700 a month, and the landlady covers his utility bills.

In residential properties, heating should be controllable by the occupants, experts say. But a landlord could choose to cover the thermostat if they are paying the bills.

Until now, Alex and his housemates have had control over the temperature of their home and the hot water via the thermostat in the communal kitchen.

"It's just quite funny," he adds.

"On Sunday night I woke up in a sweat because the heating was on, but the next morning I had to shower at work because there was no hot water," he says. The water has since returned.

Alex shared his story on Twitter on Saturday, which went viral and prompted queries over the legality of the move.

Some landlords responded to the thread by saying the move could be understandable in a situation where tenants were being careless with the heating.

So can a landlord box off a thermostat?

David Smith, policy director for the Residential Landlords Association, says there are no rules around boxing off thermostats.

But adds: "It is a matter of good tenancy management and we encourage landlords to speak first with tenants before taking such action.

"In shared homes there can often be disputes between tenants who want the thermostat set at different temperatures."

However, the issue is not clear cut.

A tenant has a right to heating and hot water, says Daniel Fitzpatrick, a partner at Hodge Jones & Allen solicitors.

But whether a landlord can box off a thermostat depends on the terms of the tenancy agreement.

"If the tenant is just paying a basic agreement where bills are not included, that could be why the landlord installed the fitting - usually thermostats can be covered," he says.

"Should that not be the case, then there could be various actions against the landlord.

"It's a basic right to be able to turn on heating and hot water, and it would be a breach of health and safety if the tenant could not."

Image copyright Getty Images Image caption Most homes in the UK are heated with a boiler and radiators, with controls such as boiler or room thermostats or timers

The Chartered Institute of Environmental Health says tenants should have control of the temperature in a dwelling.

According to the Housing Health and Safety Rating System (HHSRS), which governs housing conditions, heating should be controllable by the occupants.

In a multiple-occupancy house, like Alex's, heating may be centrally controlled but such systems "should be operated to ensure that occupants are not exposed to cold indoor temperatures and should be provided with controls to allow the occupants to regulate the temperature within their dwelling", it adds.

Cold temperatures may represent a hazard - over which the local authority can take action against the landlord.

Risks of adverse health effects arise when indoor temperature drops below 19C, with serious health risks occurring below 16C, the guidance says.

What can a tenant do if they are still unhappy?

Under the new Homes (Fitness for Human Habitation) Act 2018, residential tenancies in England granted, renewed or arising on expiry of a fixed term after 20 March 2019 are required to be free of hazards.

If a tenant feels this is not the case they could try making a claim against the landlord.

But Citizens Advice says it is better to try to "negotiate amicably" if at all possible - "due to the limited security of tenure which private tenants tend to have" - and it warns of the risk of an escalating row.

"The tenants might consider trying to take control of the heating themselves by using electric heaters.

"There is a risk, however, that the landlord may respond negatively to a huge electricity bill, and perhaps seek to serve a section 21 notice (no fault eviction notice) to terminate the tenancy at the end of the fixed term, or seek to alter the rent or other tenancy terms as a condition of any renewal."