# Heatzy pilote

The Heatzy pilote controls an electric heater through its pilot wire. The Heatzy integration exposes it as a `climate` entity whose state is not the active preset: the [command customization of `over_switch`](https://www.versatile-thermostat.org/en/docs/over-switch/) with `set_preset_mode` cannot know if the heater is on, and the off command is never sent.

## Installation with a virtual switch

1. Create a template switch: _Settings_ > _Devices & services_ > _Helpers_ > _Create helper_ > _Template_ > _Switch_.
2. Use the preset of the Heatzy as the state of the switch, for example `{{ is_state_attr('climate.my_heatzy', 'preset_mode', 'comfort') }}`.
3. For the _turn on_ action, call `climate.set_preset_mode` with the `comfort` preset. For the _turn off_ action, call it with the `away` preset.
4. Create a _VTherm_ `over_switch` on this switch, as described below.

Check the `preset_modes` attribute of your entity in _Developer tools_ > _States_ and use the exact same names.

## Activation delays

The Heatzy changes state slowly. The minimal activation and deactivation delays are set to 30 seconds so that each command has time to be applied.

## Compatibility status

- **Supported**: This device is used directly by the Versatile Thermostat maintainer or a contributor, or has been extensively tested. Devices: heatzy - pilote

## VTherm configuration

### Initialization

Go to your settings, then integrations, then click on add a new integration. Search for Versatile Thermostat.

Click on Thermostat over a switch.

### Basic attributes

Go to the "Main attributes" section.

1. Choose a name for your thermostat
2. Set the temperature sensor for your room
3. If you are using the Zigbee protocol and you have a "last_seen" entity for your temperature sensor, fill it in.

You can validate and return to the configuration menu.

### Underlying entities

Go to the underlying entities section.

1. Add the switches that will be controlled

You can validate and return to the configuration menu.

### TPI parameters

Go to the "TPI parameters" section. Uncheck the central configuration and proceed to the next screen. Configure the following values:

1. Set 30 as the minimum activation delay.
2. Set 30 as the minimum deactivation delay.

You can validate and return to the configuration menu.

## Community references

Additional references may be old. A bug reported on an old version of VTherm may have been corrected on a more recent version.

- [Discussion #177 Does Versatile thermostat work with Heatzy pilote ?](https://github.com/jmcollin78/versatile_thermostat/discussions/177)
- [Discussion #259 Piloter le chauffage des radiateur thermor et fil pilote heatzy avec versatile thermostat](https://github.com/jmcollin78/versatile_thermostat/discussions/259)
- [#1940 Bug: vswitch_off_command never sent to Heatzy when on_percent drops to 0 — is_device_active always False for climate underlyings with vswitch](https://github.com/jmcollin78/versatile_thermostat/issues/1940)
- [#1299 \[Feature Request\] - Implement a keep alive like function for over_climate](https://github.com/jmcollin78/versatile_thermostat/issues/1299)
- [Discussion #1501 \[Feature Request\] - Implement a keep alive like function for over_climate](https://github.com/jmcollin78/versatile_thermostat/discussions/1501)
- [#1881 Over_switch : after change of preset mode, underlying keeps heating while temperature is above setpoint](https://github.com/jmcollin78/versatile_thermostat/issues/1881)
- [#872 \[Feature request\] - Add native support of virtual switch in `over_switch` VTherm](https://github.com/jmcollin78/versatile_thermostat/issues/872)
- [Discussion #389 Question/remarque sur les fils pilotes](https://github.com/jmcollin78/versatile_thermostat/discussions/389)
