EFOY Fuel Cell modbus configuration example

I just wanted to put this modbus yaml config somewhere, in hope it will save some time and frustration.
This is tested on a EFOY 2800 methanol fuel cell, but I guess it will work with any of the 900/1800/2800 series cells.
The config is based on sensors I found interesting in these manuals: EFOY MODBUS TCP - Pro 900/1800/2800 : Support Centre but it’s only a fraction of the information you can get from the system.

- name: efoy2800
  type: tcp
  host: aaa.bbb.ccc.ddd  #Replace with the IP address of your cell
  port: 502
  delay: 5
  message_wait_milliseconds: 100
  timeout: 5
  binary_sensors:
    - name: "CurrentErrorActive"
      unique_id: "efoy2800.CurrentErrorActive"
      address: 2
      scan_interval: 10
      input_type: discrete_input
    - name: "CurrentWarningActive"
      unique_id: "efoy2800.CurrentWarningActive"
      address: 3
      scan_interval: 10
      input_type: discrete_input
    - name: "FuelBelow25"
      unique_id: "efoy2800.fuelBelow25"
      address: 12
      scan_interval: 30
      input_type: discrete_input
  sensors:
# Take note of this really important piece of information from the EFOY manuals:
# "The byte ordering for a 16-bit word is Big-endian.
#  The word order is Little-endian for all 32bit/64bit values."
# That is the reason all 'float32' sensors have the line 'swap: byte' in them.
# It took me a while to figure that out :)
    - name: "LogPOut"
      unique_id: "efoy2800.LogPOut"
      data_type: float32
      swap: word
      device_class: power
      scan_interval: 10
      address: 20
      input_type: input
      unit_of_measurement: "W"
    - name: "LogUBat"
      unique_id: "efoy2800.LogUBat"
      data_type: float32
      swap: word
      device_class: voltage
      scan_interval: 10
      address: 22
      input_type: input
      unit_of_measurement: "V"
    - name: "LogTAmb"
      unique_id: "efoy2800.LogTAmb"
      data_type: float32
      swap: word
      device_class: temperature
      scan_interval: 10
      address: 24
      input_type: input
      unit_of_measurement: "°C"
    - name: "LogpAmb"
      unique_id: "efoy2800.LogpAmb"
      data_type: float32
      swap: word
      device_class: atmospheric_pressure
      scan_interval: 10
      address: 295
      input_type: input
      unit_of_measurement: "hPa"
    - name: "LogRH"
      unique_id: "efoy2800.LogRH"
      data_type: float32
      swap: word
      device_class: humidity
      scan_interval: 10
      address: 297
      input_type: input
      unit_of_measurement: "%"
    - name: "LogTStack"
      unique_id: "efoy2800.LogTStack"
      data_type: float32
      swap: word
      device_class: temperature
      scan_interval: 10
      address: 287
      input_type: input
      unit_of_measurement: "°C"
    - name: "LogTHE"
      unique_id: "efoy2800.LogTHE"
      data_type: float32
      swap: word
      device_class: temperature
      scan_interval: 10
      address: 289
      input_type: input
      unit_of_measurement: "°C"
    - name: "LogTMeOH"
      unique_id: "efoy2800.LogTMeOH"
      data_type: float32
      swap: word
      device_class: temperature
      scan_interval: 10
      address: 291
      input_type: input
      unit_of_measurement: "°C"
    - name: "CartCapStatus"
      unique_id: "efoy2800.CartCapStatus"
      data_type: float32
      swap: word
      device_class: volume
      scan_interval: 10
      address: 202
      input_type: input
      unit_of_measurement: "L"
    - name: "CartRlVolStatus"
      unique_id: "efoy2800.CartRlVolStatus"
      data_type: float32
      swap: word
      device_class: battery
      min_value: 0
      max_value: 100
      scan_interval: 10
      address: 204
      input_type: input
      unit_of_measurement: "%"
    - name: "CartAbVolStatus"
      unique_id: "efoy2800.CartAbVolStatus"
      data_type: float32
      swap: word
      device_class: volume_storage
      scan_interval: 10
      address: 206
      input_type: input
      unit_of_measurement: "L"
    - name: "SystemState"
      unique_id: "efoy2800.SystemState"
      data_type: int16
      device_class: volume_storage
      scan_interval: 10
      address: 206
      input_type: input
      unit_of_measurement: "L"
  switches:
    - name: "SystemOn"
      unique_id: "efoy2800.SystemOn"
      address: 0
      write_type: coil
      verify:
    - name: "SystemOff"
      unique_id: "efoy2800.SystemOff"
      address: 1
      write_type: coil
      verify:
    - name: "SystemAuto"
      unique_id: "efoy2800.SystemAuto"
      address: 2
      write_type: coil
      verify: