The recalibrate_valves service executes a simple valve recalibration procedure for thermostatic radiator valves (TRVs) controlled by a VTherm in valve regulation mode. It temporarily forces the underlying valve actuators to their extreme positions (fully open then fully closed) to help calibrate the thermostat's valve settings.
This service is useful when you suspect incorrect open/close values, miscalibrated valves, or after installation/maintenance of the underlying equipment. For example, if a radiator heats even when its valve is reported closed, recalibration may help.
The service performs these steps for the targeted entity:
- Verify the target entity is a
ThermostatClimateValve(valve regulation). Otherwise the service returns an error. - Verify each underlying valve has two
numberentities configured for opening and closing (attributesopening_degreeandclosing_degree). If any valve lacks these entities the service refuses the operation. - Memorize the thermostat's requested state (
requested_state). - Set VTherm HVAC mode to OFF.
- Wait
delay_seconds. - For each valve: force opening to 100% (send mapped value to the
numberentity). Waitdelay_seconds. - For each valve: force closing to 100% (send mapped value to the
numberentity). Waitdelay_seconds. - Restore the original requested state and update states/attributes.
During the procedure VTherm sends direct values to the valve number entities, bypassing normal algorithm thresholds and protections. The service runs in background and returns immediately: {"message": "calibrage en cours"}.
The delay between steps is specified by the caller. The service accepts a value between 0 and 300 seconds (0–5 minutes). In practice 10–60 seconds is usually appropriate depending on valve speed; 10 s is a good starting point for most electric actuators.
- The service is available only for
ThermostatClimateValvethermostats (valve regulation). - Each underlying valve must have two
numberentities configured:opening_degree_entity_id(open command)closing_degree_entity_id(close command)
numberentities may defineminandmaxattributes; the service maps 0–100% linearly to that range. Ifmin/maxare missing, the default range is 0–100.- The service guards against concurrent executions for the same entity: if a recalibration is already running for this thermostat, a new request is refused immediately.
The service is registered as an entity service. Call it by targeting the climate entity in Home Assistant.
Service name: versatile_thermostat.recalibrate_valves
Example via Developer Tools / Services:
service: versatile_thermostat.recalibrate_valves
target:
entity_id: climate.my_thermostat
data:
delay_seconds: 30The service returns immediately:
{"message": "calibrage en cours"}| Parameter | Type | Description |
|---|---|---|
delay_seconds |
integer | Delay (seconds) to wait after full opening and after full closing. Valid range: 0–300 (recommended: 10). |
The service schema limits the value to 0–300 seconds.
- The operation runs as a background task. The caller receives an immediate acknowledgement and can follow progress in Home Assistant logs.
- At the end of the operation the requested state (
requested_state) is restored (HVAC mode, target temperature and preset if present) and states are updated. The VTherm should return to its original state assuming sensors remain stable.
- Run the recalibration once a month (example):
The YAML below triggers recalibration at 03:00 on the first day of each month:
alias: Monthly valve recalibration
trigger:
- platform: time
at: '03:00:00'
condition:
- condition: template
value_template: "{{ now().day == 1 }}"
- condition: state
entity_id: climate.my_thermostat
state: 'off'
action:
- service: versatile_thermostat.recalibrate_valves
target:
entity_id: climate.my_thermostat
data:
delay_seconds: 60
- service: persistent_notification.create
data:
title: "🔧 Monthly recalibration started"
message: "🔧 A valve recalibration was started for climate.my_thermostat"
- Test recalibration on a single VTherm first and check logs and
numbervalues before running it on multiple devices.- Set
delay_secondslong enough for the physical valve to reach the position (60 s is a reasonable start for most valves).
