Hayward pool heater with custom component

Hi everyone!

I’m happy to share that I got my Hayward pool heat pump connected to Home Assistant.

I used a Wemos D1 mini with a TTL to RS485 adapter and wrote a custom ESPHome component to interface with it, pulling sensor data and controlling settings like temperature and mode.

This is the device:

And here are some screenshots from Home Assistant.

The project is fully documented here: Hayward heat pump - connecting to ESPHome and HomeAssistant | Leontin Chiru

The new components is in the hayward branch of my esphome fork.
This branch also has some changes to the modbus component that I made.

If anyone has a similar heat pump, please give it a try.
The yaml configuration needed to use it:

uart:
  tx_pin: 1
  rx_pin: 3
  baud_rate: 9600

logger:
  baud_rate: 0

external_components:
  - source:
    type: git
    url: https://github.com/cleontin/esphome
    ref: hayward
  components: [ modbus, hayward ]

modbus:
  flow_control_pin: 2
  role: server

hayward:
  accept_broadcast: true
  server_address: 2

time:
  platform: homeassistant

I’m looking forward for any type of feedback.

Thanks!

Awesome project! I’m a little curious if this will work with some of their other heat pump models. I’ve got a summit

Hi Mike

This should work with models that have the option to add an external control panel with a four wire interface (modbus).

Looking at the Summit model, I think it does not suport an external control panel but it does have remote control input via terminals P and S. From the diagrams, it seems like you can connect a relay to the P and S terminals and use it to switch between the pool and spa profiles, allowing for some level of control.

Hi! If anyone is interested I created custom component which does not require esphome fork: GitHub - grandalos/hayward: ESPHome external component for Hayward heat pumps with PC1002 over RS485, with climate control and schedule support · GitHub

this is still experimental release but feel free to test it

Hey Leontin,
Awesome work btw, I pushed forward and made a PCB to tidy things up alittle, happy to share the file once I can prove it all works

When I try to flash the D1 Mini, I’m getting a schema issue error in ESPHome. Claude is suggesting it is due to ESPHome 2026.3.3 changes.

This is kind of above my level, but does your github need updating to reflect these changes and that is why its failing? Or is it something I can change my side?

INFO ESPHome 2026.3.3
INFO Reading configuration /config/esphome/hayward-heatpump.yaml...
ERROR Unexpected exception while reading configuration:
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/esphome/esphome/__main__.py", line 1925, in <module>
    sys.exit(main())
             ^^^^^^
  File "/esphome/esphome/__main__.py", line 1916, in main
    return run_esphome(sys.argv)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/esphome/esphome/__main__.py", line 1895, in run_esphome
    config = read_config(
             ^^^^^^^^^^^^
  File "/esphome/esphome/config.py", line 1323, in read_config
    res = load_config(command_line_substitutions, skip_external_update)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/esphome/esphome/config.py", line 1180, in load_config
    return _load_config(command_line_substitutions, skip_external_update)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/esphome/esphome/config.py", line 1168, in _load_config
    return validate_config(config, command_line_substitutions, skip_external_update)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/esphome/esphome/config.py", line 1059, in validate_config
    target_platform = core_config.preload_core_config(config, result)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/esphome/esphome/core/config.py", line 404, in preload_core_config
    if _is_target_platform(domain):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/esphome/esphome/core/config.py", line 354, in _is_target_platform
    return get_component(name, True).is_target_platform
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/esphome/esphome/loader.py", line 235, in get_component
    return _lookup_module(domain, exception)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/esphome/esphome/loader.py", line 211, in _lookup_module
    module = importlib.import_module(f"esphome.components.{domain}")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 999, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/data/external_components/50eec081/esphome/components/hayward/__init__.py", line 339, in <module>
    cv.Optional(s[CONF_KEY], default={}): switch.switch_schema(
                                          ^^^^^^^^^^^^^^^^^^^^^
TypeError: switch_schema() missing 1 required positional argument: 'class_'

Had a play and with the help of Claude. I think I’ve managed to get it flashed correctly.
Still waiting on the RS485 to TTL component to arrive to test with heatpump but can now see entities in Home Assistant

Had to fork it to make the changes, but to not take away from @cleontin will remove if/when he updates his repository

Ended up making these changes to line 339

cv.Optional(s[CONF_KEY], default={}): switch.switch_schema(switch.Switch,

and line 359

cv.Optional(s[CONF_KEY], default={}): climate._CLIMATE_SCHEMA.extend(cv.COMPONENT_SCHEMA).extend(

Hey Tandarra,

Thanks for using this and for the list of changes. I’ve been trying to figure out how to get this to compile with the new esphome. I’ll include your changes soon.

I’m also planning to re-work this component. It should live on a repo of it’s own, not a full clone of esphome. And I’ll be trying to make it work with the standard modbus, since some of the changes I needed are already there.
I’ll update here when I manage to get that done.

Your board looks nice. It would be a great improvement for what I have right now, and maybe the perfect start for me into ordering custom PCBs. It would be nice if you could share it here or in github.

Its the first PCB I have made so isn’t perfect.
I used easyeda.com to design online - EasyEDA(Standard) - A Simple and Powerful Electronic Circuit Design Tool

It uses a library of custom components from users and components from LCSC which then can be taken over to JLCPCB to manufacture.

One of the components I think the mini buck converter has its GND set to the wrong pad or I simply couldn’t figure out how to change polarity and connect the track correctly, so the simple fix is to change pins on the JST connector physically. I’m sure you will see the issue when you load it up

But have a look and let me know what you think, fix it up and I’ll delete my repository once yours is updated to not confuse anyone.

Hi,

First of all, thank you very much to all of your for sharing your works, it looks very promising !

I have a very similar heat pump which is manufactured by PHNIX. The exact brand is PPP model Prime 18, probably just another clone. The touch screen interface is exactly the same as the Hayward, and the PCB also looks pretty similar (model name 2AC32I26WO1) :

Mine even offers external screw terminals to wire an external RS485 device without opening the mainboard housing :slight_smile: (although there is no 12V there, but that's not really a problem as my ESP is a few meters away in the pool house with an external power supply).

I will use an ESP32 with a MAX3485 module. This last one works with 3.3V and doesn't have the RE/DE pins, it's supposed to be handled automatically.
I gave it a quick try with @grandalos version above, as it didn't require a custom ESPHome nor RE/DE pins, but it didn't work. The ESP did receive some packets, but always ended with this error "Dropping partial frame with x bytes after timeout".

I plan to also give a try to @cleontin version, but I am not sure that it can work for me as I have a different RS485 module without the RE/DE pins. By the way I also saw that you are working on a new version with the standard ESPHome modbus, did you had any progress with that already ?

Last question, I read that the standard RS485 wiring should include a 120 ohm terminal resistance at each end, between the A and B wires, did you use that ? My cabling is a bit longer than yours, somewhere like 4-5 meters, so maybe I get those errors because I am missing the resistance. I Just ordered some so give it a try.

Have a good one !

Most modules have 120 ohm onboard with a solder pads to enable/disable.
Also, some "MAX3485" modules don't actually use that chip at all but MS2548 that is actually 5V IC.
Some modules also have TX/RX swapped.

Thank you very much @Karosm , I didn't pay attention but indeed my module has such solder pads, it was written on the back of the module :sweat_smile: I am gonna give it a try. Do you think that I should put an other resistor on the heat pump side as well ?

Here are the the pictures of my MAX3485, it seems to be named TTL485 V2.0


It's unbelievable what you can do with IA those days ! I got the code fully written and working with all adresses from the documented protocol, working fine with the latest ESPHome version :tada:

One trap that made me lose a lot of time, on the MAX3485 you have to wire the GPIO used for TX to the RXD pin, and the GPIO used for RX to the TXD pin. It sounded like the opposite was logic to me, but I was wrong. I also soldered the 120 ohm internal resistor of the MAX3485.
After that I wired everything on the other side the 2 RS485 A+ and B- , but also the GND coming from my heat pump.

Here is the code that I have generated thanks to Google AI. I didn't check the sensors yet and there are many controls that you should probably not touch at all without risking to break your heat pump, but at the moment I just wanted to map everything possible and clean up later.

This is just the first step for me, I don't plan to use the code as it is, but I just wanted to share it here already because I am so excited :partying_face:

PS: I had to add the value 46 in the map table of H12 Type de Compresseur because my compressor model was not listed in the protocol documentation

PS 2: sorry I was talking to Google in french, so all the sensors were translated :stuck_out_tongue:

substitutions:
  friendly_name: "ESP32 PAC"

esphome:
  name: "esp32-pac"
  friendly_name: esp32-pac
  comment: "DIY ESP32 for PAC Modbus"
  compile_process_limit: 1

esp32:
  board: esp32dev
  framework:
    type: esp-idf
      
wifi:
  networks:
    - ssid: "xxxxxx"
      password: "xxxxxx0"
  fast_connect: true
  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: ${friendly_name}
    ap_timeout: 1min

captive_portal:

# Enable Home Assistant API
api:
  encryption:
    key: "xxxxxxxxxx"

ota:
  - platform: esphome
    password: "xxxxxxxx"

logger:
  level: DEBUG

uart:
  - id: modbus_bus
    tx_pin: GPIO17
    rx_pin: GPIO16
    baud_rate: 9600
    stop_bits: 1
    data_bits: 8
    parity: NONE

modbus:
  id: mx_modbus
  uart_id: modbus_bus

modbus_controller:
  - id: phnix_pac
    address: 1              
    modbus_id: mx_modbus
    update_interval: 10s

# =====================================================================
# --- COMMANDES ET PARAMÈTRES INTERRUPTEURS (Read / Write) -----------
# =====================================================================
switch:
  - platform: modbus_controller
    name: "PAC Marche/Arrêt"
    register_type: holding
    address: 1011           # 1011 (3F3h) : 0=OFF / 1=ON
    bitmask: 1

  - platform: modbus_controller
    name: "H01 Rémargage Automatique Désactivé"
    register_type: holding
    address: 1018           # 1018 (3FAh) : 0=Non (Redémarre) / 1=Oui
    bitmask: 1

  - platform: modbus_controller
    name: "F17 Activer Mode Silence Temporisé"
    register_type: holding
    address: 1072           # 1072 (430h) : 0=Non / 1=Oui
    bitmask: 1

  - platform: modbus_controller
    name: "F18 Régulation Manuelle Vitesse Ventilateur"
    register_type: holding
    address: 1073           # 1073 (431h) : 0=Non / 1=Oui
    bitmask: 1

# =====================================================================
# --- SÉLECTEURS DE MODE ET DE CONFIGURATION (Read / Write) ----------
# =====================================================================
select:
  - platform: modbus_controller
    name: "Mode de Fonctionnement"
    id: mode_pac
    address: 1012           # 1012 (3F4h)
    value_type: U_WORD      
    optionsmap:
      "Refroidissement": 0
      "Chauffage": 1
      "Automatique": 2

  - platform: modbus_controller
    name: "H02 Restriction Modes"
    address: 1019           # 1019 (3FBh)
    value_type: U_WORD
    optionsmap:
      "Froid Seul": 0
      "Chaud et Froid Auto": 1
      "Chaud Seul": 2

  - platform: modbus_controller
    name: "H12 Type de Compresseur"
    address: 1026           # 1026 (402h)
    value_type: U_WORD
    optionsmap:
      "Tout ou Rien (ON OFF)": 0
      "TNB220FLHMC_TUV": 1
      "SNB172FJGMC_TUV": 2
      "MNB36FAAMC_TUV": 3
      "TNB306FPGMC_TUV": 4
      "TNB220FUEMC_UL": 5
      "MNB36FAUMC-L_UL": 6
      "TNB306FVPMC_UL": 7
      "SNB150FGAMC": 8
      "SNB140FCAMC": 9
      "MNB36FABMC": 10
      "MNB42FFDMC": 11
      "UNKNOWN": 46

  - platform: modbus_controller
    name: "F01 Configuration Moteur Ventilateur"
    address: 1048           # 1048 (418h)
    value_type: U_WORD
    optionsmap:
      "Mono Vitesse (Max)": 0
      "Bi-Vitesse": 1
      "AC": 2
      "1x DC (Inverter)": 3
      "2x DC": 4
      "EC": 5

  - platform: modbus_controller
    name: "F10 Sonde Référence Régulation Ventilateur"
    address: 1061           # 1061 (425h) : 0=Sonde Batterie / 1=Ambiant
    value_type: U_WORD
    optionsmap:
      "Température Coil (Batterie)": 0
      "Température Ambiante": 1

  - platform: modbus_controller
    name: "Silence Mode"
    address: 1076           # 1076 (434h)
    value_type: U_WORD
    optionsmap:
      "Normal": 0
      "Silencieux": 1

  - platform: modbus_controller
    name: "F20 Fonction Port AI-DI 11"
    address: 1077           # 1077 (435h)
    value_type: U_WORD
    optionsmap:
      "Détection PWM": 0
      "Sonde Antigel Tuyauterie": 1

  - platform: modbus_controller
    name: "P01 Mode Fonctionnement Pompe à Eau"
    address: 1081           # 1081 (439h)
    value_type: U_WORD
    optionsmap:
      "Normal": 0
      "Spécial": 1
      "Intervalle": 2

  - platform: modbus_controller
    name: "D06 Mode de Dégivrage"
    address: 1106           # 1106 (452h)
    value_type: U_WORD
    optionsmap:
      "Normal": 0
      "Économique": 1

  - platform: modbus_controller
    name: "E01 Mode Détendeur Électronique (EEV)"
    address: 1116           # 1116 (45Ch)
    value_type: U_WORD
    optionsmap:
      "Manuel": 0
      "Automatique": 1
      "Auxiliaire": 2

  - platform: modbus_controller
    name: "H03 Unité de Température"
    address: 1145           # 1145 (479h)
    value_type: U_WORD
    optionsmap:
      "Celsius (°C)": 0
      "Fahrenheit (°F)": 1

# =====================================================================
# --- AJUSTEMENTS ET CONFIGURATIONS NUMÉRIQUES (Read / Write) --------
# =====================================================================
number:
  - platform: modbus_controller
    name: "Consigne Température Actuelle"
    id: consigne_temp
    register_type: holding
    address: 1013           # 1013 (3F5h) - TEMP1
    value_type: U_WORD
    unit_of_measurement: "°C"
    mode: BOX
    min_value: 15
    max_value: 40
    step: 1
    multiply: 10            

  - platform: modbus_controller
    name: "H06 Fréquence Min Compresseur Chaud"
    register_type: holding
    address: 1020           # 1020 (3FCh) : 0-60Hz
    value_type: U_WORD
    unit_of_measurement: "Hz"
    mode: BOX

  - platform: modbus_controller
    name: "H07 Fréquence Min Compresseur Froid"
    register_type: holding
    address: 1021           # 1021 (3FDh) : 0-60Hz
    value_type: U_WORD
    unit_of_measurement: "Hz"
    mode: BOX

  - platform: modbus_controller
    name: "H08 Fréquence Max Compresseur Chaud"
    register_type: holding
    address: 1022           # 1022 (3FEh) : 0-120Hz
    value_type: U_WORD
    unit_of_measurement: "Hz"
    mode: BOX

  - platform: modbus_controller
    name: "H09 Fréquence Max Compresseur Froid"
    register_type: holding
    address: 1023           # 1023 (3FFh) : 0-120Hz
    value_type: U_WORD
    unit_of_measurement: "Hz"
    mode: BOX

  - platform: modbus_controller
    name: "H10 Temporisation Arrêt sur Consigne Atteinte"
    register_type: holding
    address: 1024           # 1024 (400h) : 0-120min
    value_type: U_WORD
    unit_of_measurement: "min"
    mode: BOX

  - platform: modbus_controller
    name: "H14 Cycle Ajustement Fréquence par 0.2C"
    register_type: holding
    address: 1028           # 1028 (404h) : 0-255s
    value_type: U_WORD
    unit_of_measurement: "s"
    mode: BOX

  - platform: modbus_controller
    name: "H15 Seuil Protection Surintensité Compresseur"
    register_type: holding
    address: 1029           # 1029 (405h) - DIGI5 (0.1A)
    value_type: U_WORD
    unit_of_measurement: "A"
    mode: BOX
    multiply: 10

  - platform: modbus_controller
    name: "H33 Fréquence Max Compresseur Mode Silence"
    register_type: holding
    address: 1047           # 1047 (417h) : 0-120Hz
    value_type: U_WORD
    unit_of_measurement: "Hz"
    mode: BOX

  - platform: modbus_controller
    name: "F11 Devoir de Marche Max Ventilateur"
    register_type: holding
    address: 1062           # 1062 (426h) : 50%-100%
    value_type: U_WORD
    unit_of_measurement: "%"
    mode: BOX

  - platform: modbus_controller
    name: "P02 Intervalle de Marche Pompe à Eau"
    register_type: holding
    address: 1082           # 1082 (43Ah) : 0-60min
    value_type: U_WORD
    unit_of_measurement: "min"
    mode: BOX

  - platform: modbus_controller
    name: "P03 Durée de Marche Pompe à Eau"
    register_type: holding
    address: 1083           # 1083 (43Bh) : 0-30min
    value_type: U_WORD
    unit_of_measurement: "min"
    mode: BOX

  - platform: modbus_controller
    name: "D03 Cycle de Dégivrage"
    register_type: holding
    address: 1104           # 1104 (450h) : 45min d'usine
    value_type: U_WORD
    unit_of_measurement: "min"
    mode: BOX

  - platform: modbus_controller
    name: "D04 Durée Max de Dégivrage"
    register_type: holding
    address: 1105           # 1105 (451h) : 8min d'usine
    value_type: U_WORD
    unit_of_measurement: "min"
    mode: BOX

  - platform: modbus_controller
    name: "E02 Surchauffe cible EEV"
    register_type: holding
    address: 1117           # 1117 (45Dh) - TEMP1 (-20 à 20C)
    value_type: S_WORD
    unit_of_measurement: "°C"
    mode: BOX
    multiply: 10

  - platform: modbus_controller
    name: "E03 Ouverture Initiale EEV"
    register_type: holding
    address: 1118           # 1118 (45Eh) : 0-500 steps
    value_type: U_WORD
    unit_of_measurement: "steps"
    mode: BOX

  - platform: modbus_controller
    name: "R01 Réglage Entrée Eau en Froid"
    register_type: holding
    address: 1135           # 1135 (46Fh) - TEMP1
    value_type: S_WORD
    unit_of_measurement: "°C"
    mode: BOX
    multiply: 10

  - platform: modbus_controller
    name: "R02 Réglage Entrée Eau en Chaud"
    register_type: holding
    address: 1136           # 1136 (470h) - TEMP1
    value_type: S_WORD
    unit_of_measurement: "°C"
    mode: BOX
    multiply: 10

  - platform: modbus_controller
    name: "R04 Différentiel Redémarrage PAC"
    register_type: holding
    address: 1138           # 1138 (472h) - TEMP1 (0 à 10C)
    value_type: S_WORD
    unit_of_measurement: "°C"
    mode: BOX
    multiply: 10

# =====================================================================
# --- SONDES ET CAPTEURS DE MESURE EN LECTURE SEULE -------------------
# =====================================================================
sensor:
  - platform: modbus_controller
    name: "Température Entrée Eau Actuelle"
    register_type: holding
    address: 1016           # 1016 (3F8h) : Température référence d'entrée d'eau
    value_type: S_WORD
    unit_of_measurement: "°C"
    accuracy_decimals: 1
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    name: "T01 Température Aspiration Gazeuse"
    register_type: holding
    address: 2045           # 2045 (7FDh) : Température d'aspiration du gaz
    value_type: S_WORD
    unit_of_measurement: "°C"
    accuracy_decimals: 1
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    name: "T02 Température Entrée Eau (Copie)"
    register_type: holding
    address: 2046           # 2046 (7FEh) : Deuxième lecture entrée d'eau
    value_type: S_WORD
    unit_of_measurement: "°C"
    accuracy_decimals: 1
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    name: "T03 Température Sortie Eau"
    register_type: holding
    address: 2047           # 2047 (7FFh) : Température de l'eau rejetée
    value_type: S_WORD
    unit_of_measurement: "°C"
    accuracy_decimals: 1
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    name: "T04 Température Évaporateur (Coil)"
    register_type: holding
    address: 2048           # 2048 (800h) : Température de la batterie d'échange
    value_type: S_WORD
    unit_of_measurement: "°C"
    accuracy_decimals: 1
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    name: "T05 Température Ambiante"
    register_type: holding
    address: 2049           # 2049 (801h) : Sonde d'air extérieur
    value_type: S_WORD
    unit_of_measurement: "°C"
    accuracy_decimals: 1
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    name: "T06 Température Refoulement (Exhaust)"
    register_type: holding
    address: 2050           # 2050 (802h) : Gaz comprimé en sortie de compresseur
    value_type: S_WORD
    unit_of_measurement: "°C"
    accuracy_decimals: 1
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    name: "T08 Sortie Moteur Ventilateur AC"
    register_type: holding
    address: 2052           # 2052 (804h) : Statut ou puissance de ventilation AC
    value_type: U_WORD

  - platform: modbus_controller
    name: "T11 Surchauffe Réelle (Superheat)"
    register_type: holding
    address: 2060           # 2060 (80Ch) : Valeur de surchauffe calculée
    value_type: S_WORD
    unit_of_measurement: "°C"
    accuracy_decimals: 1
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    name: "O07 Fréquence Compresseur Courante"
    register_type: holding
    address: 2021           # 2021 (7E5h) : Vitesse réelle de l'inverter
    value_type: U_WORD
    unit_of_measurement: "Hz"

  - platform: modbus_controller
    name: "O08 Courant Compresseur"
    register_type: holding
    address: 2022           # 2022 (7E6h) : Intensité en Ampères
    value_type: U_WORD
    unit_of_measurement: "A"
    accuracy_decimals: 1
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    name: "O09 Température Module IPM"
    register_type: holding
    address: 2023           # 2023 (7E7h) : Température des composants de puissance
    value_type: S_WORD
    unit_of_measurement: "°C"

  - platform: modbus_controller
    name: "Puissance Actuelle Consommée"
    register_type: holding
    address: 2055           # 2055 (807h) : Énergie estimée (courbe de performance)
    value_type: U_WORD
    unit_of_measurement: "kW"
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    name: "T12 Vitesse Ventilateur DC"
    register_type: holding
    address: 2061           # 2061 (80Dh) : Vitesse du ventilateur principal
    value_type: U_WORD
    unit_of_measurement: "RPM"

  - platform: modbus_controller
    name: "O06 Ouverture Détendeur EEV"
    register_type: holding
    address: 2020           # 2020 (7E4h) : Nombre de pas d'ouverture de la vanne
    value_type: U_WORD
    unit_of_measurement: "steps"

  - platform: modbus_controller
    name: "Version de la Carte Contrôleur"
    register_type: holding
    address: 2083
    value_type: U_WORD

  - platform: modbus_controller
    name: "Code du Logiciel Interne (Firmware)"
    register_type: holding
    address: 2084
    value_type: U_WORD

# =====================================================================
# --- ÉTATS LOGIQUES ET ALARMES DE PANNES EXHAUSTIFS (Read Only) -----
# =====================================================================
binary_sensor:
  - platform: modbus_controller
    name: "Statut Physique Marche/Arrêt Écran"
    register_type: holding
    address: 2011           # 2011 (7DBh)
    bitmask: 0x0001

  # --- Décodage du Registre de Sorties Relais Actives 2019 (7E3h) ---
  - platform: modbus_controller
    name: "Relais : Compresseur"
    register_type: holding
    address: 2019
    bitmask: 0x0001         # bit0

  - platform: modbus_controller
    name: "Relais : Ventilateur Haute Vitesse"
    register_type: holding
    address: 2019
    bitmask: 0x0002         # bit1

  - platform: modbus_controller
    name: "Relais : Ventilateur Basse Vitesse"
    register_type: holding
    address: 2019
    bitmask: 0x0004         # bit2

  - platform: modbus_controller
    name: "Relais : Pompe de Circulation Eau"
    register_type: holding
    address: 2019
    bitmask: 0x0008         # bit3

  - platform: modbus_controller
    name: "Relais : Vanne 4 Voies (Dégivrage)"
    register_type: holding
    address: 2019
    bitmask: 0x0010         # bit4

  # --- Décodage des Entrées Capteurs Sécurités Physiques 2034 (7F2h) ---
  - platform: modbus_controller
    name: "Sécurité : Pressostat Haute Pression (HP)"
    register_type: holding
    address: 2034
    bitmask: 0x0001         # bit0 : S01
  - platform: modbus_controller
    name: "Sécurité : Pressostat Basse Pression (LP)"
    register_type: holding
    address: 2034
    bitmask: 0x0002         # bit1 : S02
  - platform: modbus_controller
    name: "Sécurité : Capteur de Débit d'Eau"
    register_type: holding
    address: 2034
    bitmask: 0x0004         # bit2 : S03
  - platform: modbus_controller
    name: "Sécurité : Commutateur On/Off Distant"
    register_type: holding
    address: 2034
    bitmask: 0x0008         # bit3 : S04

  # =====================================================================
  # --- REGISTRE DE PANNES 1 : Adresse 2074 (81Ah) ----------------------
  # =====================================================================
  - platform: modbus_controller
    name: "Panne : Capteur Température Entrée Eau (P01)"
    register_type: holding
    address: 2074
    bitmask: 0x0001         # bit0
    device_class: problem
  - platform: modbus_controller
    name: "Panne : Capteur Température Sortie Eau (P02)"
    register_type: holding
    address: 2074
    bitmask: 0x0002         # bit1
    device_class: problem
  - platform: modbus_controller
    name: "Panne : Capteur Température Ambiante (P04)"
    register_type: holding
    address: 2074
    bitmask: 0x0004         # bit2
    device_class: problem
  - platform: modbus_controller
    name: "Panne : Capteur Température Batterie (P05)"
    register_type: holding
    address: 2074
    bitmask: 0x0008         # bit3
    device_class: problem
  - platform: modbus_controller
    name: "Panne : Capteur Température Aspiration (P07)"
    register_type: holding
    address: 2074
    bitmask: 0x0010         # bit4
    device_class: problem
  - platform: modbus_controller
    name: "Panne : Capteur Température Refoulement (P081)"
    register_type: holding
    address: 2074
    bitmask: 0x0020         # bit5
    device_class: problem
  - platform: modbus_controller
    name: "Alarme : Protection Surintensité Compresseur (E051)"
    register_type: holding
    address: 2074
    bitmask: 0x0040         # bit6
    device_class: problem
  - platform: modbus_controller
    name: "Alarme : Sécurité Haute Pression Gaz (E01)"
    register_type: holding
    address: 2074
    bitmask: 0x0080         # bit7
    device_class: problem
  - platform: modbus_controller
    name: "Alarme : Sécurité Basse Pression Gaz (E02)"
    register_type: holding
    address: 2074
    bitmask: 0x0100         # bit8
    device_class: problem
  - platform: modbus_controller
    name: "Alarme : Manque Débit d'Eau (E03)"
    register_type: holding
    address: 2074
    bitmask: 0x0200         # bit9
    device_class: problem
  - platform: modbus_controller
    name: "Alarme : Antigel Hiver Primaire (E19)"
    register_type: holding
    address: 2074
    bitmask: 0x0400         # bit10
    device_class: problem
  - platform: modbus_controller
    name: "Alarme : Antigel Hiver Secondaire (E29)"
    register_type: holding
    address: 2074
    bitmask: 0x0800         # bit11
    device_class: problem
  - platform: modbus_controller
    name: "Alarme : Protection Antigel Échangeur (E07)"
    register_type: holding
    address: 2074
    bitmask: 0x1000         # bit12
    device_class: problem
  - platform: modbus_controller
    name: "Alarme : Surchauffe Refoulement Circuit 1"
    register_type: holding
    address: 2074
    bitmask: 0x2000         # bit13
    device_class: problem
  - platform: modbus_controller
    name: "Alarme : Écart T° Entrée/Sortie trop haut (E06)"
    register_type: holding
    address: 2074
    bitmask: 0x4000         # bit14
    device_class: problem
  - platform: modbus_controller
    name: "Statut : Cycle de Dégivrage en Cours"
    register_type: holding
    address: 2074
    bitmask: 0x8000         # bit15

  # =====================================================================
  # --- REGISTRE DE PANNES 2 : Adresse 2075 (81Bh) ----------------------
  # =====================================================================
  - platform: modbus_controller
    name: "Panne : Verrouillage Surcharge Compresseur (>3 fois)"
    register_type: holding
    address: 2075
    bitmask: 0x0001         # bit0
    device_class: problem
  - platform: modbus_controller
    name: "Panne : Verrouillage Haute Pression (>3 fois)"
    register_type: holding
    address: 2075
    bitmask: 0x0002         # bit1
    device_class: problem
  - platform: modbus_controller
    name: "Panne : Verrouillage Basse Pression (>3 fois)"
    register_type: holding
    address: 2075
    bitmask: 0x0004         # bit2
    device_class: problem
  - platform: modbus_controller
    name: "Panne : Verrouillage Débit d'Eau (>3 fois)"
    register_type: holding
    address: 2075
    bitmask: 0x0008         # bit3
    device_class: problem
  - platform: modbus_controller
    name: "Panne : Verrouillage Antigel (>3 fois)"
    register_type: holding
    address: 2075
    bitmask: 0x0010         # bit4
    device_class: problem
  - platform: modbus_controller
    name: "Panne : Verrouillage Surchauffe Refoulement (>3 fois)"
    register_type: holding
    address: 2075
    bitmask: 0x0020         # bit5
    device_class: problem
  - platform: modbus_controller
    name: "Alerte : Driver MOP Avertissement (F01)"
    register_type: holding
    address: 2075
    bitmask: 0x0040         # bit6
    device_class: problem
  - platform: modbus_controller
    name: "Panne : Carte Convertisseur Inverter Hors-ligne (F02)"
    register_type: holding
    address: 2075
    bitmask: 0x0080         # bit7
    device_class: problem
  - platform: modbus_controller
    name: "Panne : Protection Matérielle Module IPM (F03)"
    register_type: holding
    address: 2075
    bitmask: 0x0100         # bit8
    device_class: problem
  - platform: modbus_controller
    name: "Panne : Échec de Démarrage du Compresseur (F04)"
    register_type: holding
    address: 2075
    bitmask: 0x0200         # bit9
    device_class: problem
  - platform: modbus_controller
    name: "Panne : Perte de Phase d'Entrée Convertisseur (F17)"
    register_type: holding
    address: 2075
    bitmask: 0x0400         # bit10
    device_class: problem
  - platform: modbus_controller
    name: "Panne : Échec Échantillonnage Courant IPM (F18)"
    register_type: holding
    address: 2075
    bitmask: 0x0800         # bit11
    device_class: problem
  - platform: modbus_controller
    name: "Panne : Protection Surchauffe Convertisseur (F20)"
    register_type: holding
    address: 2075
    bitmask: 0x1000         # bit12
    device_class: problem
  - platform: modbus_controller
    name: "Panne : Surtension Bus DC Convertisseur (F07)"
    register_type: holding
    address: 2075
    bitmask: 0x2000         # bit13
    device_class: problem
  - platform: modbus_controller
    name: "Panne : Sous-tension Bus DC Convertisseur (F08)"
    register_type: holding
    address: 2075
    bitmask: 0x4000         # bit14
    device_class: problem
  - platform: modbus_controller
    name: "Panne : Sous-tension d'Entrée"
    register_type: holding
    address: 2075
    bitmask: 0x8000         # bit15
    device_class: problem

  # =====================================================================
  # --- REGISTRE DE PANNES 3 : Adresse 2076 (81Ch) ----------------------
  # =====================================================================
  - platform: modbus_controller
    name: "Panne : Surtension d'Entrée"
    register_type: holding
    address: 2076
    bitmask: 0x0001         # bit0
    device_class: problem
    
  - platform: modbus_controller
    name: "Panne : Échec Échantillonnage Tension"
    register_type: holding
    address: 2076
    bitmask: 0x0002         # bit1
    device_class: problem
    
  - platform: modbus_controller
    name: "Panne : Échec Liaison DSP et PFC (F12)"
    register_type: holding
    address: 2076
    bitmask: 0x0004         # bit2
    device_class: problem
    
  - platform: modbus_controller
    name: "Panne : Capteur Température Radiateur HS (F19)"
    register_type: holding
    address: 2076
    bitmask: 0x0008         # bit3
    device_class: problem
    
  - platform: modbus_controller
    name: "Panne : Anomalie Tension V15V (F28)"
    register_type: holding
    address: 2076
    bitmask: 0x0010         # bit4
    device_class: problem
    
  - platform: modbus_controller
    name: "Panne : Échec Étage PFC (F27)"
    register_type: holding
    address: 2076
    bitmask: 0x0020         # bit5
    device_class: problem

  - platform: modbus_controller
    name: "Panne : Surchauffe Module IPM (F15)"
    register_type: holding
    address: 2076
    bitmask: 0x0040         # bit6
    device_class: problem

  - platform: modbus_controller
    name: "Panne : Protection Faiblesse Magnétique (F16)"
    register_type: holding
    address: 2076
    bitmask: 0x0080         # bit7
    device_class: problem

  - platform: modbus_controller
    name: "Avertissement : Surintensité d'Entrée (F24)"
    register_type: holding
    address: 2076
    bitmask: 0x0100         # bit8
    device_class: problem

  - platform: modbus_controller
    name: "Avertissement : Surchauffe Convertisseur (F22)"
    register_type: holding
    address: 2076
    bitmask: 0x0200         # bit9
    device_class: problem

  - platform: modbus_controller
    name: "Panne : Protection Globale Surintensité Entrée"
    register_type: holding
    address: 2076
    bitmask: 0x0400         # bit10
    device_class: problem

  - platform: modbus_controller
    name: "Avertissement : Erreur EEPROM (F25)"
    register_type: holding
    address: 2076
    bitmask: 0x0800         # bit11
    device_class: problem

  - platform: modbus_controller
    name: "Panne : Alerte Protection IPM"
    register_type: holding
    address: 2076
    bitmask: 0x1000         # bit12
    device_class: problem

  - platform: modbus_controller
    name: "Panne : Driver Moteur Ventilateur DC HS"
    register_type: holding
    address: 2076
    bitmask: 0x2000         # bit13
    device_class: problem

  - platform: modbus_controller
    name: "Panne : Défaut Capteur Pression (PP)"
    register_type: holding
    address: 2076
    bitmask: 0x4000         # bit14
    device_class: problem

  - platform: modbus_controller
    name: "Panne : Surintensité Majeure Entrée (F26)"
    register_type: holding
    address: 2076
    bitmask: 0x8000         # bit15
    device_class: problem

  # =====================================================================
  # --- REGISTRE DE PANNES 4 : Adresse 2077 (81Dh) ----------------------
  # =====================================================================
  - platform: modbus_controller
    name: "Protection : Antigel Actif"
    register_type: holding
    address: 2077
    bitmask: 0x0001         # bit0

  - platform: modbus_controller
    name: "Protection : Antigel Actif en Mode Chauffage"
    register_type: holding
    address: 2077
    bitmask: 0x0002         # bit1

  - platform: modbus_controller
    name: "Panne : Perte Signal Retour Moteur EC"
    register_type: holding
    address: 2077
    bitmask: 0x0004         # bit2
    device_class: problem

  - platform: modbus_controller
    name: "Panne : Dysfonctionnement Moteur Ventilateur 1"
    register_type: holding
    address: 2077
    bitmask: 0x0008         # bit3
    device_class: problem

  - platform: modbus_controller
    name: "Panne : Dysfonctionnement Moteur Ventilateur 2"
    register_type: holding
    address: 2077
    bitmask: 0x0010         # bit4
    device_class: problem

  - platform: modbus_controller
    name: "Panne : Échec Communication Moteur Ventilateur DC"
    register_type: holding
    address: 2077
    bitmask: 0x0020         # bit5
    device_class: problem

I think that I am done with the modbus configuration for my heat pump. I used a very straight forward approach as suggested by Google AI, without any modification to the way modbus is implemented into ESPHome, nor any specific method like @grandalos who use some caching for commands to replicate his oem behaviour. Note that I also have an Aquatemp module on the RS485 which was sold with my heat pump, and it still works perfectly on the top of the ESPHome.

So for those interested, here is my code (partially in french and english). The code is spread over 3 posts due to the forum message lenght limitation :

EDIT: sorry the code is just too long, the forum forbids me to post more than 2 messages following each other, so here is only the first part with the uart connecionion


uart:
  - id: modbus_bus
    tx_pin: GPIO17
    rx_pin: GPIO16
    baud_rate: 9600
    stop_bits: 1
    data_bits: 8
    parity: NONE

modbus:
  id: mx_modbus
  uart_id: modbus_bus

modbus_controller:
  - id: phnix_pac
    address: 1              
    modbus_id: mx_modbus
    update_interval: 10s

# =====================================================================
# --- COMMANDES ET PARAMÈTRES INTERRUPTEURS (Read / Write) -----------
# =====================================================================
switch:
  - platform: modbus_controller
    id: pac_marche_arret 
    name: "Marche-Arrêt"
    register_type: holding
    address: 1011           # 1011 (3F3h) : 0=OFF / 1=ON
    bitmask: 1
    device_class: switch

  - platform: modbus_controller
    name: "H01 Désactiver redémarrage automatique"
    register_type: holding
    address: 1018           # 1018 (3FAh) : 0=Non (Redémarre) / 1=Oui
    bitmask: 1
    entity_category: config
    icon: mdi:restart-off

  - platform: modbus_controller
    name: "Programme Silencieux"
    register_type: holding
    address: 1072           # 1072 (430h) : 0=Non / 1=Oui
    bitmask: 1
    icon: mdi:fan-clock

  - platform: modbus_controller
    name: "F18 Régulation manuelle vitesse ventilateur"
    register_type: holding
    address: 1073           # 1073 (431h) : 0=Non / 1=Oui
    bitmask: 1
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "Programme 1 - Démarrage Auto"
    register_type: holding
    address: 1158           # 1158
    bitmask: 1
    icon: mdi:calendar-start

  - platform: modbus_controller
    name: "Programme 1 - Arrêt Auto"
    register_type: holding
    address: 1159           # 1159
    bitmask: 1
    icon: mdi:calendar-end

  - platform: modbus_controller
    name: "Programme 2 - Démarrage Auto"
    register_type: holding
    address: 1160           # 1160
    bitmask: 1
    icon: mdi:calendar-start

  - platform: modbus_controller
    name: "Programme 2 - Arrêt Auto"
    register_type: holding
    address: 1161           # 1161
    bitmask: 1
    icon: mdi:calendar-end

# =====================================================================
# --- SÉLECTEURS DE MODE ET DE CONFIGURATION (Read / Write) ----------
# =====================================================================
select:
  - platform: modbus_controller
    id: mode_pac
    name: "Mode de fonctionnement"
    address: 1012           # 1012 (3F4h)
    value_type: U_WORD      
    optionsmap:
      "Refroidissement": 0
      "Chauffage": 1
      "Automatique": 2
    icon: mdi:heat-pump-outline

  - platform: modbus_controller
    name: "H02 Modes disponibles"
    address: 1019           # 1019 (3FBh)
    value_type: U_WORD
    optionsmap:
      "Froid Seul": 0
      "Chaud et Froid": 1
      "Chaud Seul": 2
    entity_category: config
    disabled_by_default: true
    icon: mdi:sun-snowflake-variant

  - platform: modbus_controller
    name: "H12 Type de compresseur"
    address: 1026           # 1026 (402h)
    value_type: U_WORD
    optionsmap:
      "Tout ou Rien (ON OFF)": 0
      "TNB220FLHMC_TUV": 1
      "SNB172FJGMC_TUV": 2
      "MNB36FAAMC_TUV": 3
      "TNB306FPGMC_TUV": 4
      "TNB220FUEMC_UL": 5
      "MNB36FAUMC-L_UL": 6
      "TNB306FVPMC_UL": 7
      "SNB150FGAMC": 8
      "SNB140FCAMC": 9
      "MNB36FABMC": 10
      "MNB42FFDMC": 11
      "UNKNOWN": 46
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "H16 Refrigerant type"
    address: 1030           # 1030
    value_type: U_WORD
    optionsmap:
      "R410A": 0
      "R407C": 1
      "R32": 2
      "R290": 3
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "F01 Fan motor configuration"
    address: 1048           # 1048 (418h)
    value_type: U_WORD
    optionsmap:
      "Single speed (High)": 0
      "Dual speed": 1
      "AC": 2
      "DC-1 (Inverter)": 3
      "DC-2": 4
      "EC": 5
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "F10 Fan speed regulation temp. source"
    address: 1061           # 1061 (425h)
    value_type: U_WORD
    optionsmap:
      "Coil": 0
      "Abient": 1
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "Mode du ventilateur"
    address: 1076           # 1076 (434h) : 0=OFF / 1=ON
    value_type: U_WORD
    optionsmap:
      "Automatique": 0
      "Silencieux": 1
    icon: mdi:fan

  - platform: modbus_controller
    name: "F20 Function for AI-DI 11 port"
    address: 1077           # 1077 (435h)
    value_type: U_WORD
    optionsmap:
      "PWM detect": 0
      "Antifreeze T° sensor": 1
    entity_category: config
    disabled_by_default: true
    icon: mdi:midi-port

  - platform: modbus_controller
    name: "P01 Mode fonctionnement pompe à eau"
    address: 1081           # 1081 (439h)
    value_type: U_WORD
    optionsmap:
      "Normal": 0
      "Spécial": 1
      "Intervalle": 2
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "D06 Mode de dégivrage"
    address: 1106           # 1106 (452h)
    value_type: U_WORD
    optionsmap:
      "Normal": 0
      "Économique": 1
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "E01 EEV mode"
    address: 1116           # 1116 (45Ch)
    value_type: U_WORD
    optionsmap:
      "Manual": 0
      "Auto": 1
      "Auxiliary": 2
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "H03 Unité de température"
    address: 1145           # 1145 (479h)
    value_type: U_WORD
    optionsmap:
      "Celsius (°C)": 0
      "Fahrenheit (°F)": 1
    entity_category: config
    disabled_by_default: true
    icon: mdi:temperature-celsius

# =====================================================================
# --- AJUSTEMENTS ET CONFIGURATIONS NUMÉRIQUES (Read / Write) --------
# =====================================================================
number:
  - platform: modbus_controller
    name: "Consigne de température"
    id: consigne_temperature
    register_type: holding
    address: 1013           # 1013 (3F5h) - TEMP1
    value_type: U_WORD
    unit_of_measurement: "°C"
    device_class: temperature
    mode: BOX
    min_value: 15
    max_value: 35
    step: 0.5
    multiply: 10
#    on_value:
#      then:
#        - climate.control:
#            id: pac_climate
#            target_temperature: !lambda "return x;"

  - platform: modbus_controller
    name: "H06 Minimum compressor frequency in heating"
    register_type: holding
    address: 1020           # 1020 (3FCh) : 0-60Hz
    value_type: U_WORD
    unit_of_measurement: "Hz"
    device_class: frequency
    mode: BOX
    min_value: 0
    max_value: 120
    step: 1
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "H07 Minimum compressor frequency in cooling"
    register_type: holding
    address: 1021           # 1021 (3FDh) : 0-60Hz
    value_type: U_WORD
    unit_of_measurement: "Hz"
    device_class: frequency
    mode: BOX
    min_value: 0
    max_value: 120
    step: 1
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "H08 Maximum compressor frequency in heating"
    register_type: holding
    address: 1022           # 1022 (3FEh) : 0-120Hz
    value_type: U_WORD
    unit_of_measurement: "Hz"
    device_class: frequency
    mode: BOX
    min_value: 0
    max_value: 120
    step: 1
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "H09 Maximum compressor frequency in cooling"
    register_type: holding
    address: 1023           # 1023 (3FFh) : 0-120Hz
    value_type: U_WORD
    unit_of_measurement: "Hz"
    device_class: frequency
    mode: BOX
    min_value: 0
    max_value: 120
    step: 1
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "H10 Temporisation arrêt lorsque consigne atteinte"
    register_type: holding
    address: 1024           # 1024 (400h) : 0-120min
    value_type: U_WORD
    unit_of_measurement: "min"
    device_class: duration
    mode: BOX
    min_value: 0
    max_value: 120
    step: 1
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "H11 Auto mode delay before rechecking inlet temperature"
    register_type: holding
    address: 1025           # 1025
    value_type: U_WORD
    unit_of_measurement: "min"
    device_class: duration
    mode: BOX
    min_value: 0
    max_value: 255
    step: 1
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "H13 Compressor defrost frequency"
    register_type: holding
    address: 1027           # 1027 : 0-120Hz
    value_type: U_WORD
    unit_of_measurement: "Hz"
    device_class: frequency
    mode: BOX
    min_value: 0
    max_value: 120
    step: 1
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "H14 Cycle ajustement fréquence par 0.2C"
    register_type: holding
    address: 1028           # 1028 (404h) : 0-255min
    value_type: U_WORD
    unit_of_measurement: "min"
    device_class: duration
    mode: BOX
    min_value: 1
    max_value: 255
    step: 1
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "H15 Seuil protection surintensité compresseur"
    register_type: holding
    address: 1029           # 1029 (405h) - DIGI5 (0.1A)
    value_type: U_WORD
    unit_of_measurement: "A"
    device_class: current
    mode: BOX
    min_value: 1
    max_value: 24.5
    step: 0.1
    multiply: 10
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "H17 Cooling start compensation low ambient temp."
    register_type: holding
    address: 1031           # 1031
    value_type: S_WORD
    unit_of_measurement: "°C"
    device_class: temperature
    mode: BOX
    min_value: 5
    max_value: 35
    step: 1
    multiply: 10
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "H18 Cooling stop compensation low ambient temp."
    register_type: holding
    address: 1032           # 1032
    value_type: S_WORD
    unit_of_measurement: "°C"
    device_class: temperature
    mode: BOX
    min_value: 5
    max_value: 35
    step: 1
    multiply: 10
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "H19 Cooling max. frequency low ambient temp."
    register_type: holding
    address: 1033           # 1033
    value_type: U_WORD
    unit_of_measurement: "Hz"
    device_class: frequency
    mode: BOX
    min_value: 20
    max_value: 100
    step: 1
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "H20 Cooling start compensation high ambient temp."
    register_type: holding
    address: 1034           # 1034
    value_type: S_WORD
    unit_of_measurement: "°C"
    device_class: temperature
    mode: BOX
    min_value: 5
    max_value: 55
    step: 1
    multiply: 10
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "H21 Cooling stop compensation high ambient temp."
    register_type: holding
    address: 1035           # 1035
    value_type: S_WORD
    unit_of_measurement: "°C"
    device_class: temperature
    mode: BOX
    min_value: 5
    max_value: 55
    step: 1
    multiply: 10
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "H22 Cooling stop frequency high ambient temp."
    register_type: holding
    address: 1036           # 1036
    value_type: U_WORD
    unit_of_measurement: "Hz"
    device_class: frequency
    mode: BOX
    min_value: 20
    max_value: 100
    step: 1
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "H23 Heating start compensation low ambient temp."
    register_type: holding
    address: 1037           # 1037
    value_type: S_WORD
    unit_of_measurement: "°C"
    device_class: temperature
    mode: BOX
    min_value: -15
    max_value: 45
    step: 1
    multiply: 10
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "H24 Heating stop compensation low ambient temp."
    register_type: holding
    address: 1038           # 1038
    value_type: S_WORD
    unit_of_measurement: "°C"
    device_class: temperature
    mode: BOX
    min_value: -5
    max_value: 45
    step: 1
    multiply: 10
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "H25 Heating max. frequency low ambient temp."
    register_type: holding
    address: 1039           # 1039
    value_type: U_WORD
    unit_of_measurement: "Hz"
    device_class: frequency
    mode: BOX
    min_value: 20
    max_value: 100
    step: 1
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "H26 Heating start compensation high ambient temp."
    register_type: holding
    address: 1040           # 1040
    value_type: S_WORD
    unit_of_measurement: "°C"
    device_class: temperature
    mode: BOX
    min_value: -15
    max_value: 55
    step: 1
    multiply: 10
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "H27 Heating stop compensation high ambient temp."
    register_type: holding
    address: 1041           # 1041
    value_type: S_WORD
    unit_of_measurement: "°C"
    device_class: temperature
    mode: BOX
    min_value: -15
    max_value: 55
    step: 1
    multiply: 10
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "H28 Heating max. frequency high ambient temp."
    register_type: holding
    address: 1042           # 1042
    value_type: U_WORD
    unit_of_measurement: "Hz"
    device_class: frequency
    mode: BOX
    min_value: 20
    max_value: 100
    step: 1
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "H29 Max. pressure sensor value"
    register_type: holding
    address: 1043           # 1043
    value_type: U_WORD
    unit_of_measurement: "bar"
    device_class: pressure
    mode: BOX
    min_value: -100
    max_value: 100
    step: 1
    multiply: 0.001
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "H30 Min. pressure sensor value"
    register_type: holding
    address: 1044           # 1044
    value_type: U_WORD
    unit_of_measurement: "bar"
    device_class: pressure
    mode: BOX
    min_value: -100
    max_value: 100
    step: 1
    multiply: 0.001
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "H31 Ambient temp. start overheat compensation"
    register_type: holding
    address: 1045           # 1045
    value_type: S_WORD
    unit_of_measurement: "°C"
    device_class: temperature
    mode: BOX
    min_value: -15
    max_value: 15
    step: 1
    multiply: 10
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "H32 Ambient temp. stop overheat compensation"
    register_type: holding
    address: 1046           # 1046
    value_type: S_WORD
    unit_of_measurement: "°C"
    device_class: temperature
    mode: BOX
    min_value: -15
    max_value: 15
    step: 1
    multiply: 10
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "H33 Fréquence max. Compresseur Mode Silence"
    register_type: holding
    address: 1047           # 1047 (417h) : 0-120Hz
    value_type: U_WORD
    unit_of_measurement: "Hz"
    device_class: frequency
    mode: BOX
    min_value: 0
    max_value: 120
    step: 1
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "F02 Temperature for max. fan speed in cooling"
    register_type: holding
    address: 1049           # 1049
    value_type: S_WORD
    unit_of_measurement: "°C"
    device_class: temperature
    mode: BOX
    min_value: -15
    max_value: 60
    step: 1
    multiply: 10
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "F02-bar Pressure for max. fan speed in cooling"
    register_type: holding
    address: 1050           # 1044
    value_type: U_WORD
    unit_of_measurement: "bar"
    device_class: pressure
    mode: BOX
    min_value: 0
    max_value: 10
    step: 1
    multiply: 0.001
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "F03 Temperature for min. fan speed in cooling"
    register_type: holding
    address: 1051          # 1051
    value_type: S_WORD
    unit_of_measurement: "°C"
    device_class: temperature
    mode: BOX
    min_value: -15
    max_value: 60
    step: 1
    multiply: 10
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "F03-bar Pressure for min. fan speed in cooling"
    register_type: holding
    address: 1052           # 1052
    value_type: U_WORD
    unit_of_measurement: "bar"
    device_class: pressure
    mode: BOX
    min_value: 0
    max_value: 10
    step: 1
    multiply: 0.001
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "F04 Temperature for stopping fan in cooling"
    register_type: holding
    address: 1053           # 1053
    value_type: S_WORD
    unit_of_measurement: "°C"
    device_class: temperature
    mode: BOX
    min_value: -15
    max_value: 60
    step: 1
    multiply: 10
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "F04-bar Pressure for fan stopping in cooling"
    register_type: holding
    address: 1054           # 1054
    value_type: U_WORD
    unit_of_measurement: "bar"
    device_class: pressure
    mode: BOX
    min_value: 0
    max_value: 10
    step: 1
    multiply: 0.001
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "F05 Temperature for max. fan speed in heating"
    register_type: holding
    address: 1055           # 1055
    value_type: S_WORD
    unit_of_measurement: "°C"
    device_class: temperature
    mode: BOX
    min_value: -15
    max_value: 60
    step: 1
    multiply: 10
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "F05-bar Pressure for max. fan speed in heating"
    register_type: holding
    address: 1056           # 1056
    value_type: U_WORD
    unit_of_measurement: "bar"
    device_class: pressure
    mode: BOX
    min_value: 0
    max_value: 10
    step: 1
    multiply: 0.001
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "F06 Temperature for min. fan speed in heating"
    register_type: holding
    address: 1057           # 1057
    value_type: S_WORD
    unit_of_measurement: "°C"
    device_class: temperature
    mode: BOX
    min_value: -15
    max_value: 60
    step: 1
    multiply: 10
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "F06-bar Pressure for min. fan speed in heating"
    register_type: holding
    address: 1058           # 1058
    value_type: U_WORD
    unit_of_measurement: "bar"
    device_class: pressure
    mode: BOX
    min_value: 0
    max_value: 10
    step: 1
    multiply: 0.001
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "F07 Temperature for fan stopping in heating"
    register_type: holding
    address: 1059           # 1059
    value_type: S_WORD
    unit_of_measurement: "°C"
    device_class: temperature
    mode: BOX
    min_value: -15
    max_value: 60
    step: 1
    multiply: 10
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "F07-bar Pressure for fan stopping in heating"
    register_type: holding
    address: 1060           # 1060
    value_type: U_WORD
    unit_of_measurement: "bar"
    device_class: pressure
    mode: BOX
    min_value: 0
    max_value: 10
    step: 1
    multiply: 0.001
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "F11 Max. duty ratio in heating"
    register_type: holding
    address: 1062           # 1062 (426h) : 50%-100%
    value_type: U_WORD
    unit_of_measurement: "%"
    mode: BOX
    min_value: 0
    max_value: 100
    step: 1
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "F11-r Max. fan speed in heating"
    register_type: holding
    address: 1063           # 1063
    value_type: U_WORD
    unit_of_measurement: "RPM"
    mode: BOX
    min_value: 0
    max_value: 1300
    step: 1
    multiply: 100
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "F12 Max. duty ratio in cooling"
    register_type: holding
    address: 1064           # 1064
    value_type: U_WORD
    unit_of_measurement: "%"
    mode: BOX
    min_value: 0
    max_value: 100
    step: 1
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "F12-r Min. fan speed in cooling"
    register_type: holding
    address: 1065           # 1065
    value_type: U_WORD
    unit_of_measurement: "RPM"
    mode: BOX
    min_value: 300
    max_value: 1300
    step: 1
    multiply: 100
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "F13 Min. duty ratio in heating"
    register_type: holding
    address: 1066           # 1066
    value_type: U_WORD
    unit_of_measurement: "%"
    mode: BOX
    min_value: 0
    max_value: 100
    step: 1
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "F13-r Min. fan speed in heating"
    register_type: holding
    address: 1067           # 1067
    value_type: U_WORD
    unit_of_measurement: "RPM"
    mode: BOX
    min_value: 300
    max_value: 1300
    step: 1
    multiply: 100
    entity_category: config
    disabled_by_default: true

  # --- TIMERS MODE SILENCIEUX (Heures uniquement) ---
  - platform: modbus_controller
    address: 1068
    register_type: holding
    internal: true
    id: silent_start_hour_raw
    value_type: U_WORD

  - platform: modbus_controller
    address: 1069
    register_type: holding
    internal: true
    id: silent_stop_hour_raw
    value_type: U_WORD

#  - platform: modbus_controller
#    name: "Début du programme Silencieux"
#    register_type: holding
#    address: 1068           # 1068 : 0-23h
#    value_type: U_WORD
#    unit_of_measurement: "h"
#    mode: BOX
#    min_value: 0
#    max_value: 23
#    step: 1

#  - platform: modbus_controller
#    name: "Fin du programme Silencieux"
#    register_type: holding
#    address: 1069           # 1069 : 0-23h
#    value_type: U_WORD
#    unit_of_measurement: "h"
#    mode: BOX
#    min_value: 0
#    max_value: 23
#    step: 1

  - platform: modbus_controller
    name: "F16 Silent mode duty ratio"
    register_type: holding
    address: 1070           # 1070
    value_type: U_WORD
    unit_of_measurement: "%"
    mode: BOX
    min_value: 0
    max_value: 100
    step: 1
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "F16-r Silent mode fan speed"
    register_type: holding
    address: 1071           # 1071
    value_type: U_WORD
    unit_of_measurement: "RPM"
    mode: BOX
    min_value: 300
    max_value: 1300
    step: 1
    multiply: 100
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "F19 AC fan rated duty ratio"
    register_type: holding
    address: 1074           # 1074
    value_type: U_WORD
    unit_of_measurement: "%"
    mode: BOX
    min_value: 0
    max_value: 100
    step: 1
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "F19-r DC-EC fan rated speed"
    register_type: holding
    address: 1075           # 1069
    value_type: U_WORD
    unit_of_measurement: "RPM"
    mode: BOX
    min_value: 0
    max_value: 1300
    step: 1
    multiply: 100
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "P02 Intervalle de Marche Pompe à Eau"
    register_type: holding
    address: 1082           # 1082 (43Ah) : 0-60min
    value_type: U_WORD
    unit_of_measurement: "min"
    device_class: duration
    mode: BOX
    min_value: 0
    max_value: 60
    step: 1
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "P03 Durée de Marche Pompe à Eau"
    register_type: holding
    address: 1083           # 1083 (43Bh) : 0-30min
    value_type: U_WORD
    unit_of_measurement: "min"
    device_class: duration
    mode: BOX
    min_value: 0
    max_value: 30
    step: 1
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "P04 Water pump advance compressor time"
    register_type: holding
    address: 1084           # 1084
    value_type: U_WORD
    unit_of_measurement: "min"
    device_class: duration
    mode: BOX
    min_value: 0
    max_value: 10
    step: 1
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "D01 Start defrosting temperature"
    register_type: holding
    address: 1101           # 1101
    value_type: S_WORD
    unit_of_measurement: "°C"
    device_class: temperature
    mode: BOX
    min_value: -30
    max_value: 5
    step: 1
    multiply: 10
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "D01-bar Start defrosting pressure"
    register_type: holding
    address: 1102           # 1102
    value_type: U_WORD
    unit_of_measurement: "bar"
    device_class: pressure
    mode: BOX
    min_value: 0
    max_value: 10
    step: 1
    multiply: 0.001
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "D02 Stop defrosting temperature"
    register_type: holding
    address: 1103           # 1103
    value_type: S_WORD
    unit_of_measurement: "°C"
    device_class: temperature
    mode: BOX
    min_value: 0
    max_value: 30
    step: 1
    multiply: 10
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "D03 Defrosting Cycle"
    register_type: holding
    address: 1104           # 1104 (450h) : 45min d'usine
    value_type: U_WORD
    unit_of_measurement: "min"
    device_class: duration
    mode: BOX
    min_value: 30
    max_value: 90
    step: 1
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "D04 Max. defrosting time"
    register_type: holding
    address: 1105           # 1105 (451h) : 8min d'usine
    value_type: U_WORD
    unit_of_measurement: "min"
    device_class: duration
    mode: BOX
    min_value: 1
    max_value: 20
    step: 1
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "D07 Ambient temp. to start slide defrosting"
    register_type: holding
    address: 1107           # 1107
    value_type: S_WORD
    unit_of_measurement: "°C"
    device_class: temperature
    mode: BOX
    min_value: -20
    max_value: 10
    step: 1
    multiply: 10
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "D09 Difference of ambient temp. after starting slide defrosting"
    register_type: holding
    address: 1108           # 1108
    value_type: S_WORD
    unit_of_measurement: "°C"
    device_class: temperature_delta
    mode: BOX
    min_value: 0
    max_value: 30
    step: 1
    multiply: 10
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "D08 Difference of coil temp. after starting slide defrosting"
    register_type: holding
    address: 1109           # 1109
    value_type: S_WORD
    unit_of_measurement: "°C"
    device_class: temperature_delta
    mode: BOX
    min_value: 0
    max_value: 50
    step: 1
    multiply: 10
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "D08-bar Difference of pressure after starting slide defrosting"
    register_type: holding
    address: 1110           # 1110
    value_type: U_WORD
    unit_of_measurement: "bar"
    device_class: pressure
    mode: BOX
    min_value: 0
    max_value: 10
    step: 1
    multiply: 0.001
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "D10 Coil temp. to stop slide defrosting"
    register_type: holding
    address: 1111           # 1111
    value_type: S_WORD
    unit_of_measurement: "°C"
    device_class: temperature
    mode: BOX
    min_value: -30
    max_value: 5
    step: 1
    multiply: 10
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "D10-bar Pressure to stop slide defrosting"
    register_type: holding
    address: 1112           # 1112
    value_type: U_WORD
    unit_of_measurement: "bar"
    device_class: pressure
    mode: BOX
    min_value: 0
    max_value: 10
    step: 1
    multiply: 0.001
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "E02 EEV Target super heat"
    register_type: holding
    address: 1117           # 1117 (45Dh) - TEMP1 (-20 à 20C)
    value_type: S_WORD
    unit_of_measurement: "°C"
    device_class: temperature
    mode: BOX
    min_value: -20
    max_value: 20
    step: 1
    multiply: 10
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "E03 EEV initial opening"
    register_type: holding
    address: 1118           # 1118 (45Eh) : 0-500 steps
    value_type: U_WORD
    unit_of_measurement: "steps"
    mode: BOX
    min_value: 0
    max_value: 500
    step: 1
    entity_category: config
    disabled_by_default: true

  - platform: modbus_controller
    name: "E04 EEV min. opening"
    register_type: holding
    address: 1119           # 1119
    value_type: U_WORD
    unit_of_measurement: "steps"
    mode: BOX
    min_value: 10
    max_value: 500
    step: 1
    entity_category: config
    disabled_by_default: true