Pompe a chaleur O'foehn wifi plugin de gestion

Bonsoir messieurs,

J’ai bien avancé avec curl pour les commandes awk et cut,
Je donnerai le fichier configuration.yaml dès que j’ai fini de mettre les bons paramètres au bon endroit.
Merci pour votre aide

Cordialement

Bonsoir messieurs,
J’ai pas mal fait travailler chatgpt pour ça mais c’est fait pour les sondes :


# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

# Text to speech
tts:
  - platform: google_translate

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
shell_command:
  ofoehn_cron: 'curl http://192.168.1.98:80/changeOnOff.cgi'
  ofoehn_light_on: 'curl -d "1" http://192.168.1.98:80/toggleE.cgi'
  ofoehn_light_off: 'curl -d "0" http://192.168.1.98:80/toggleE.cgi'
  ofoehn_set_temp: 'curl -d "consigneFroid={{ temp }}&consigneChaud={{ temp }}&consigneAuto={{ temp }}" http://192.168.1.98:80/setReg.cgi'
  ofoehn_mode_hot: 'curl -d "mode=CHAUD" http://192.168.1.98:80/setReg.cgi'
  ofoehn_mode_cold: 'curl -d "mode=FROID" http://192.168.1.98:80/setReg.cgi'
  ofoehn_mode_auto: 'curl -d "mode=AUTO" http://192.168.1.98:80/setReg.cgi'
  
sensor:
  - platform: command_line
    name: Ofoehn Water In
    command: 'curl -s http://192.168.1.98:80/super.cgi | awk "NR==6"| cut -c 1-4'
    unit_of_measurement: "°C"
  - platform: command_line
    name: Ofoehn Water Out
    command: 'curl -s http://192.168.1.98:80/super.cgi | awk "NR==7" | cut -c 1-4'
    unit_of_measurement: "°C"
  - platform: command_line
    name: Ofoehn Air Temperature
    command: 'curl -s http://192.168.1.98:80/super.cgi | awk "NR==8" | cut -c 1-4'
    unit_of_measurement: "°C"
  - platform: command_line
    name: Ofoehn Mode Temperature
    command: "curl -s http://192.168.1.98:80/getReg.cgi"
    value_template: >-
      {% set lines = value.split('\n') %}
      {% set line1 = lines[0] %}
      {% set line2 = lines[1] %}
      {% set line3 = lines[2] %}
      {% set line4 = lines[3] %}
      {% if line1 == 'Chaud' %}
        {{ line3 }}
      {% elif line1 == 'Froid' %}
        {{ line2 }}
      {% elif line1 == 'Auto' %}
        {{ line4 }}
      {% else %}
        Valeur inconnue
      {% endif %}
    unit_of_measurement: "°C"
  - platform: command_line
    name: Ofoehn Power WiFi
    command: 'curl -s http://192.168.1.98:80/accueil.cgi | awk "NR==16"'
  - platform: command_line
    name: Ofoehn Name WiFi
    command: 'curl -s http://192.168.1.98:80/accueil.cgi | awk "NR==15"'
  - platform: command_line
    name: Ofoehn Pump State
    command: 'curl -s http://192.168.1.98:80/super.cgi | awk "NR==26"'
  - platform: command_line
    name: Ofoehn Filtration Mode
    command: 'curl -s http://192.168.1.98:80/getReg.cgi | awk "NR==6"'
  - platform: command_line
    name: Ofoehn Mode
    command: 'curl -s http://192.168.1.98:80/getReg.cgi | head -n 1'
  - platform: command_line
    name: Ofoehn Error
    command: "curl -s http://192.168.1.98:80/accueil.cgi | awk 'NR==8' | cut -d'>' -f2 | cut -d'<' -f1"
  - platform: command_line
    name: Ofoehn Flow
    command: "curl -s http://192.168.1.98:80/accueil.cgi | awk 'NR==9' | cut -d'>' -f2 | cut -d'<' -f1"

résultat:

1 « J'aime »

Bonjour,
J’ai eu une erreur d’affichage sur flux quand il y avait ‹ Pas de débit ›, pb d’accent…
voici le code modifié


# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

# Text to speech
tts:
  - platform: google_translate

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
shell_command:
  ofoehn_cron: 'curl http://192.168.1.98:80/changeOnOff.cgi'
  ofoehn_light_on: 'curl -d "1" http://192.168.1.98:80/toggleE.cgi'
  ofoehn_light_off: 'curl -d "0" http://192.168.1.98:80/toggleE.cgi'
  ofoehn_set_temp: 'curl -d "consigneFroid={{ temp }}&consigneChaud={{ temp }}&consigneAuto={{ temp }}" http://192.168.1.98:80/setReg.cgi'
  ofoehn_mode_hot: 'curl -d "mode=CHAUD" http://192.168.1.98:80/setReg.cgi'
  ofoehn_mode_cold: 'curl -d "mode=FROID" http://192.168.1.98:80/setReg.cgi'
  ofoehn_mode_auto: 'curl -d "mode=AUTO" http://192.168.1.98:80/setReg.cgi'

sensor:
  - platform: command_line
    name: Ofoehn Water In
    command: 'curl -s http://192.168.1.98:80/super.cgi | awk "NR==6"| cut -c 1-4'
    unit_of_measurement: "°C"
  - platform: command_line
    name: Ofoehn Water Out
    command: 'curl -s http://192.168.1.98:80/super.cgi | awk "NR==7" | cut -c 1-4'
    unit_of_measurement: "°C"
  - platform: command_line
    name: Ofoehn Air Temperature
    command: 'curl -s http://192.168.1.98:80/super.cgi | awk "NR==8" | cut -c 1-4'
    unit_of_measurement: "°C"
  - platform: command_line
    name: Ofoehn Mode Temperature
    command: "curl -s http://192.168.1.98:80/getReg.cgi"
    value_template: >-
      {% set lines = value.split('\n') %}
      {% set line1 = lines[0] %}
      {% set line2 = lines[1] %}
      {% set line3 = lines[2] %}
      {% set line4 = lines[3] %}
      {% if line1 == 'Chaud' %}
        {{ line3 }}
      {% elif line1 == 'Froid' %}
        {{ line2 }}
      {% elif line1 == 'Auto' %}
        {{ line4 }}
      {% else %}
        Valeur inconnue
      {% endif %}
    unit_of_measurement: "°C"
  - platform: command_line
    name: Ofoehn Power WiFi
    command: 'curl -s http://192.168.1.98:80/accueil.cgi | awk "NR==16"'
  - platform: command_line
    name: Ofoehn Name WiFi
    command: 'curl -s http://192.168.1.98:80/accueil.cgi | awk "NR==15"'
  - platform: command_line
    name: Ofoehn Pump State
    command: 'curl -s http://192.168.1.98:80/super.cgi | awk "NR==26"'
  - platform: command_line
    name: Ofoehn Filtration Mode
    command: 'curl -s http://192.168.1.98:80/getReg.cgi | awk "NR==6"'
  - platform: command_line
    name: Ofoehn Mode
    command: 'curl -s http://192.168.1.98:80/getReg.cgi | head -n 1'
  - platform: command_line
    name: Ofoehn Error
    command: "curl -s http://192.168.1.98:80/accueil.cgi | awk 'NR==8' | cut -d'>' -f2 | cut -d'<' -f1"
  - platform: command_line
    name: Ofoehn Flow
    command: "curl -s http://192.168.1.98:80/accueil.cgi | awk 'NR==9' | cut -d'>' -f2 | cut -d'<' -f1"
    value_template: >-
     {% if value == 'Pas de d&eacute;bit' %}
     {{ 'Pas de débit' }}
     {% else %}
     {{ value }}
     {% endif %}

Bonjour,
Je m’intéresse a votre projet, j’ai moi meme une pac en version compact W .
y a t’il un moyen d’activer l’option wifi présente dans l’automate ?.
j’ai noté la presence d’une carte SD et un port usb sur celui ci mais …

cordialement

JIMMY

Bonjour,
Je ne suis pas sur d’avoir compris,
Cherchez vous a connecter votre PAC sur votre wifi ?
Si oui, avez-vous une antenne qui dépasse de votre PAC ?
Si oui, pouvez vous vous connectez dessus avec votre smartphone ou votre pc ?
Si non, peut-être avez vous une manip a faire sur la PAC directement
Cordialement

Bonjour la communauté,
je cherche a mettre des variables PAC en tête du fichier configuration.yaml pour changer juste le nécessaire sans tout refaire, pouvez vous m’aider a corriger svp

configuration.yaml:

# Définition des PAC
PAC:
  ofoehn_ip: "192.168.1.98"
  ofoehn_port: "80"

# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

# Text to speech
tts:
  - platform: google_translate

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

input_number:
  ofoehn_desired_temp:
    name: Température souhaitée
    initial: 28
    min: 15
    max: 30
    step: 1

shell_command:
  ofoehn_cron: 'curl http://{{ PAC.OFoehn_IP }}:{{ PAC.OFoehn_Port }}/changeOnOff.cgi'
  ofoehn_light_on: 'curl -d "1" http://{{ PAC.OFoehn_IP }}:{{ PAC.OFoehn_Port }}/toggleE.cgi'
  ofoehn_light_off: 'curl -d "0" http://{{ PAC.OFoehn_IP }}:{{ PAC.OFoehn_Port }}/toggleE.cgi'
#  ofoehn_set_temp: 'curl -d "consigneFroid={{ temp }}&consigneChaud={{ temp }}&consigneAuto={{ temp }}" http://{{ PAC.OFoehn_IP }}:{{ PAC.OFoehn_Port }}/setReg.cgi'
  ofoehn_mode_hot: 'curl -d "mode=CHAUD" http://{{ PAC.OFoehn_IP }}:{{ PAC.OFoehn_Port }}/setReg.cgi'
  ofoehn_mode_cold: 'curl -d "mode=FROID" http://{{ PAC.OFoehn_IP }}:{{ PAC.OFoehn_Port }}/setReg.cgi'
  ofoehn_mode_auto: 'curl -d "mode=AUTO" http://{{ PAC.OFoehn_IP }}:{{ PAC.OFoehn_Port }}/setReg.cgi'
  ofoehn_set_temp: 'curl -d "consigneFroid={{ states("input_number.ofoehn_desired_temp") }}&consigneChaud={{ states("input_number.ofoehn_desired_temp") }}&consigneAuto={{ states("input_number.ofoehn_desired_temp") }}" http://{{ PAC.OFoehn_IP }}:{{ PAC.OFoehn_Port }}/setReg.cgi'
switch:
  - platform: command_line
    switches:
      ofoehn_mode_hot:
        command_on: 'curl -d "mode=CHAUD" http://{{ PAC.OFoehn_IP }}:{{ PAC.OFoehn_Port }}/setReg.cgi'
        friendly_name: "Mode Chaud"
        # Add any other necessary parameters if required for turning off the mode

      ofoehn_mode_cold:
        command_on: 'curl -d "mode=FROID" http://{{ PAC.OFoehn_IP }}:{{ PAC.OFoehn_Port }}/setReg.cgi'
        friendly_name: "Mode Froid"
        # Add any other necessary parameters if required for turning off the mode

      ofoehn_mode_auto:
        command_on: 'curl -d "mode=AUTO" http://{{ PAC.OFoehn_IP }}:{{ PAC.OFoehn_Port }}/setReg.cgi'
        friendly_name: "Mode Auto"
        # Add any other necessary parameters if required for turning off the mode
sensor:
  - platform: command_line
    name: Ofoehn Water In
    command: 'curl -s http://{{ PAC.OFoehn_IP }}:{{ PAC.OFoehn_Port }}/super.cgi | awk "NR==6"| cut -c 1-4'
    unit_of_measurement: "°C"
  - platform: command_line
    name: Ofoehn Water Out
    command: 'curl -s http://{{ PAC.OFoehn_IP }}:{{ PAC.OFoehn_Port }}/super.cgi | awk "NR==7" | cut -c 1-4'
    unit_of_measurement: "°C"
  - platform: command_line
    name: Ofoehn Air Temperature
    command: 'curl -s http://{{ PAC.OFoehn_IP }}:{{ PAC.OFoehn_Port }}/super.cgi | awk "NR==8" | cut -c 1-4'
    unit_of_measurement: "°C"
  - platform: command_line
    name: Ofoehn Mode Temperature
    command: "curl -s http://{{ PAC.OFoehn_IP }}:{{ PAC.OFoehn_Port }}/getReg.cgi"
    value_template: >-
      {% set lines = value.split('\n') %}
      {% set line1 = lines[0] %}
      {% set line2 = lines[1] %}
      {% set line3 = lines[2] %}
      {% set line4 = lines[3] %}
      {% if line1 == 'Chaud' %}
        {{ line3 }}
      {% elif line1 == 'Froid' %}
        {{ line2 }}
      {% elif line1 == 'Auto' %}
        {{ line4 }}
      {% else %}
        Valeur inconnue
      {% endif %}
    unit_of_measurement: "°C"
  - platform: command_line
    name: Ofoehn Power WiFi
    command: 'curl -s http://{{ PAC.OFoehn_IP }}:{{ PAC.OFoehn_Port }}/accueil.cgi | awk "NR==16"'
  - platform: command_line
    name: Ofoehn Name WiFi
    command: 'curl -s http://{{ PAC.OFoehn_IP }}:{{ PAC.OFoehn_Port }}/accueil.cgi | awk "NR==15"'
  - platform: command_line
    name: Ofoehn Pump State
    command: 'curl -s http://{{ PAC.OFoehn_IP }}:{{ PAC.OFoehn_Port }}/super.cgi | awk "NR==26"'
  - platform: command_line
    name: Ofoehn Filtration Mode
    command: 'curl -s http://{{ PAC.OFoehn_IP }}:{{ PAC.OFoehn_Port }}/getReg.cgi | awk "NR==6"'
  - platform: command_line
    name: Ofoehn Mode
    command: 'curl -s http://{{ PAC.OFoehn_IP }}:{{ PAC.OFoehn_Port }}/getReg.cgi | head -n 1'
  - platform: command_line
    name: Ofoehn Error
    command: "curl -s http://{{ PAC.OFoehn_IP }}:{{ PAC.OFoehn_Port }}/accueil.cgi | awk 'NR==8' | cut -d'>' -f2 | cut -d'<' -f1"
  - platform: command_line
    name: Ofoehn Flow
    command: "curl -s http://{{ PAC.OFoehn_IP }}:{{ PAC.OFoehn_Port }}/accueil.cgi | awk 'NR==9' | cut -d'>' -f2 | cut -d'<' -f1"
    value_template: >-
     {% if value == 'Pas de d&eacute;bit' %}
     {{ 'Pas de débit' }}
     {% else %}
     {{ value }}
     {% endif %}

Bonjour,

Il vous faut utiliser des input_*. Soit en créant des entrées depuis l’interface soit en yaml comme vous l’avez fait avec la température souhaitée.

Bonjour Makai,
J’ai bien avancé sur tes recommandations, il me reste une erreur pour les commandes avec du more, voici mon code qui fonctionne pour toutes les sondes sauf Ofoehn Water In, Ofoehn Water Out et Ofoehn Air Temperature, si je remplace les input par l’ip et le port, ca fonctionne


# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

# Text to speech
tts:
  - platform: google_translate

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

input_number:
  ofoehn_desired_temp:
    name: Température souhaitée
    initial: 28
    min: 15
    max: 30
    step: 1
input_text:
  ofoehn_ip:
    name: Adresse IP de la pompe à chaleur
    initial: "192.168.1.98"

  ofoehn_port:
    name: Port de la pompe à chaleur
    initial: "80"
   
shell_command:
  ofoehn_cron: 'curl http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/changeOnOff.cgi'
  ofoehn_light_on: 'curl -d "1" http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/toggleE.cgi'
  ofoehn_light_off: 'curl -d "0" http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/toggleE.cgi'
#  ofoehn_set_temp: 'curl -d "consigneFroid={{ temp }}&consigneChaud={{ temp }}&consigneAuto={{ temp }}" http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/setReg.cgi'
  ofoehn_mode_hot: 'curl -d "mode=CHAUD" http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/setReg.cgi'
  ofoehn_mode_cold: 'curl -d "mode=FROID" http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/setReg.cgi'
  ofoehn_mode_auto: 'curl -d "mode=AUTO" http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/setReg.cgi'
  ofoehn_set_temp: 'curl -d "consigneFroid={{ states("input_number.ofoehn_desired_temp") }}&consigneChaud={{ states("input_number.ofoehn_desired_temp") }}&consigneAuto={{ states("input_number.ofoehn_desired_temp") }}" http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/setReg.cgi'
switch:
  - platform: command_line
    switches:
      ofoehn_mode_hot:
        command_on: 'curl -d "mode=CHAUD" http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/setReg.cgi'
        friendly_name: "Mode Chaud"
        # Add any other necessary parameters if required for turning off the mode

      ofoehn_mode_cold:
        command_on: 'curl -d "mode=FROID" http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/setReg.cgi'
        friendly_name: "Mode Froid"
        # Add any other necessary parameters if required for turning off the mode

      ofoehn_mode_auto:
        command_on: 'curl -d "mode=AUTO" http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/setReg.cgi'
        friendly_name: "Mode Auto"
        # Add any other necessary parameters if required for turning off the mode
sensor:
  - platform: command_line
    name: Debug Ofoehn IP
    command: 'echo "{{ states("input_text.ofoehn_ip") }}"'
  - platform: command_line
    name: Debug Ofoehn Port
    command: 'echo "{{ states("input_text.ofoehn_port") }}"'
  - platform: command_line
    name: Ofoehn Water In
    command: 'curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/super.cgi | awk "NR==6" | cut -c 1-4'
    unit_of_measurement: "°C"
  - platform: command_line
    name: Ofoehn Water Out
    command: 'curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/super.cgi | awk "NR==7" | cut -c 1-4'
    unit_of_measurement: "°C"
  - platform: command_line
    name: Ofoehn Air Temperature
    command: 'curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/super.cgi | awk "NR==8" | cut -c 1-4'
    unit_of_measurement: "°C"
  - platform: command_line
    name: Ofoehn Mode Temperature
    command: 'curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/getReg.cgi'
    value_template: >-
      {% set lines = value.split('\n') %}
      {% set line1 = lines[0] %}
      {% set line2 = lines[1] %}
      {% set line3 = lines[2] %}
      {% set line4 = lines[3] %}
      {% if line1 == 'Chaud' %}
        {{ line3 }}
      {% elif line1 == 'Froid' %}
        {{ line2 }}
      {% elif line1 == 'Auto' %}
        {{ line4 }}
      {% else %}
        Valeur inconnue
      {% endif %}
    unit_of_measurement: "°C"
  - platform: command_line
    name: Ofoehn Power WiFi
    command: 'curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/accueil.cgi | awk "NR==16"'
  - platform: command_line
    name: Ofoehn Name WiFi
    command: 'curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/accueil.cgi | awk "NR==15"'
  - platform: command_line
    name: Ofoehn Pump State
    command: 'curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/super.cgi | awk "NR==26"'
  - platform: command_line
    name: Ofoehn Filtration Mode
    command: 'curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/getReg.cgi | awk "NR==6"'
  - platform: command_line
    name: Ofoehn Mode
    command: 'curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/getReg.cgi | head -n 1'
  - platform: command_line
    name: Ofoehn Error
    command: (curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/accueil.cgi | awk 'NR==8' | cut -d'>' -f2 | cut -d'<' -f1)
  - platform: command_line
    name: Ofoehn Flow
    command: (curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/accueil.cgi | awk 'NR==9' | cut -d'>' -f2 | cut -d'<' -f1)
    value_template: >-
     {% if value == 'Pas de d&eacute;bit' %}
     {{ 'Pas de débit' }}
     {% else %}
     {{ value }}
     {% endif %}

L’intégration command_line n’accepte pas de template dans la commande d’après la documentation… je ne sais pas pourquoi ça marche dans un cas mais pas dans l’autre.
Que disent les logs ?

Je me demande si vous ne devriez pas passer par l’intégration scrape ?

ressource_template accepte les templates et avec un seul appel à la page vous pourriez récupérer toutes les infos

Bonjour,
petit refresh de mon fichier configuration.yaml pour la PAC Ofoehn
avec un switch pour allumer la PAC est voir son état


# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

# Text to speech
tts:
  - platform: google_translate

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

input_number:
  ofoehn_desired_temp:
    name: Température souhaitée
    initial: 28
    min: 15
    max: 30
    step: 1
    
input_text:
  ofoehn_ip:
    name: Adresse IP de la pompe à chaleur
    initial: "192.168.1.98"
  ofoehn_port:
    name: Port de la pompe à chaleur
    initial: "80"
   
shell_command:
  ofoehn_cron: 'curl http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/changeOnOff.cgi'
  ofoehn_light_on: 'curl -d "1" http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/toggleE.cgi'
  ofoehn_light_off: 'curl -d "0" http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/toggleE.cgi'
  ofoehn_mode_hot: 'curl -d "mode=CHAUD" http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/setReg.cgi'
  ofoehn_mode_cold: 'curl -d "mode=FROID" http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/setReg.cgi'
  ofoehn_mode_auto: 'curl -d "mode=AUTO" http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/setReg.cgi'
  ofoehn_set_temp: 'curl -d http://192.168.1.98:80/setReg.cgi consigneFroid=28&consigneChaud=28&consigneAuto=28'
  ofoehn_onoff: 'curl http://192.168.1.98:80/changeOnOff.cgi'
switch:
  - platform: template
    switches:
      ofoehn_power:
        value_template: "{{ is_state('sensor.ofoehn_state', 'ON') }}"
        turn_on:
          service: shell_command.ofoehn_onoff
        turn_off:
          service: shell_command.ofoehn_onoff
        friendly_name: OFoehn Power

sensor:
  - platform: command_line
    name: Debug Ofoehn IP
    command: 'echo "{{ states("input_text.ofoehn_ip") }}"'
  - platform: command_line
    name: Debug Ofoehn Port
    command: 'echo "{{ states("input_text.ofoehn_port") }}"'
  - platform: command_line
    name: Ofoehn Water In
    command: 'curl -s http://192.168.1.98:80/super.cgi | awk "NR==6" | cut -c 1-4'
    unit_of_measurement: "°C"
  - platform: command_line
    name: Ofoehn Water Out
    command: 'curl -s http://192.168.1.98:80/super.cgi | awk "NR==7" | cut -c 1-4'
    unit_of_measurement: "°C"
  - platform: command_line
    name: Ofoehn Air Temperature
    command: 'curl -s http://192.168.1.98:80/super.cgi | awk "NR==8" | cut -c 1-4'
    unit_of_measurement: "°C"
  - platform: command_line
    name: Ofoehn Mode Temperature
    command: 'curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/getReg.cgi'
    value_template: >-
      {% set lines = value.split('\n') %}
      {% set line1 = lines[0] %}
      {% set line2 = lines[1] %}
      {% set line3 = lines[2] %}
      {% set line4 = lines[3] %}
      {% if line1 == 'Chaud' %}
        {{ line3 }}
      {% elif line1 == 'Froid' %}
        {{ line2 }}
      {% elif line1 == 'Auto' %}
        {{ line4 }}
      {% else %}
        Valeur inconnue
      {% endif %}
    unit_of_measurement: "°C"
  - platform: command_line
    name: Ofoehn Power WiFi
    command: 'curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/accueil.cgi | awk "NR==16"'
  - platform: command_line
    name: Ofoehn Name WiFi
    command: 'curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/accueil.cgi | awk "NR==15"'
  - platform: command_line
    name: Ofoehn Pump State
    command: 'curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/super.cgi | awk "NR==26"'
  - platform: command_line
    name: Ofoehn Filtration Mode
    command: 'curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/getReg.cgi | awk "NR==6"'
  - platform: command_line
    name: Ofoehn Mode
    command: 'curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/getReg.cgi | head -n 1'
  - platform: command_line
    name: Ofoehn Error
    command: (curl -s http://192.168.1.98:80/accueil.cgi | awk 'NR==8' | cut -d'>' -f2 | cut -d'<' -f1)
  - platform: command_line
    name: Ofoehn Flow
    command: (curl -s http://192.168.1.98:80/accueil.cgi | awk 'NR==9' | cut -d'>' -f2 | cut -d'<' -f1)
    value_template: >-
     {% if value == 'Pas de d&eacute;bit' %}
     {{ 'Pas de débit' }}
     {% else %}
     {{ value }}
     {% endif %}
  - platform: command_line
    name: Ofoehn State
    command: (curl -s http://192.168.1.98:80/accueil.cgi | awk 'NR==6' | cut -d'>' -f2 | cut -d'<' -f1)
    scan_interval: 10

Bonjour la communauté,

J’ai 2 soucis,
le 1er c’est que la commande pour régler la température ne fonctionne pas
le 2eme c’est que je veux mettre la valeur initial de la température souhaitée réglée sur sensor.ofoehn_state
si une ame charitable peut me guider pour trouver la solution
voici configuration.yaml


# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

# Text to speech
tts:
  - platform: google_translate

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

input_number:
  ofoehn_desired_temp:
    name: Température souhaitée
    initial: 28
    min: 15
    max: 30
    step: 1
    
input_text:
  ofoehn_ip:
    name: Adresse IP de la pompe à chaleur
    initial: "192.168.1.98"
  ofoehn_port:
    name: Port de la pompe à chaleur
    initial: "80"
   
shell_command:
  ofoehn_cron: 'curl http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/changeOnOff.cgi'
  #ofoehn_set_temp: 'curl "http://192.168.1.98:80/setReg.cgi/consigneChaud={{ states("input_number.ofoehn_desired_temp") }}"'
  ofoehn_set_temp: 'curl "http://192.168.1.98:80/setReg.cgi/consigneFroid={{ trigger.to_state.state }}&consigneChaud={{ trigger.to_state.state }}&consigneAuto={{ trigger.to_state.state }}"'
  ofoehn_onoff: 'curl http://192.168.1.98:80/changeOnOff.cgi'
switch:
  - platform: template
    switches:
      ofoehn_power:
        value_template: "{{ is_state('sensor.ofoehn_state', 'ON') }}"
        turn_on:
          service: shell_command.ofoehn_onoff
        turn_off:
          service: shell_command.ofoehn_onoff
        friendly_name: OFoehn Power

sensor:
  - platform: command_line
    name: Debug Ofoehn IP
    command: 'echo "{{ states("input_text.ofoehn_ip") }}"'
  - platform: command_line
    name: Debug Ofoehn Port
    command: 'echo "{{ states("input_text.ofoehn_port") }}"'
  - platform: command_line
    name: Ofoehn Water In
    command: 'curl -s http://192.168.1.98:80/super.cgi | awk "NR==6" | cut -c 1-4'
    unit_of_measurement: "°C"
  - platform: command_line
    name: Ofoehn Water Out
    command: 'curl -s http://192.168.1.98:80/super.cgi | awk "NR==7" | cut -c 1-4'
    unit_of_measurement: "°C"
  - platform: command_line
    name: Ofoehn Air Temperature
    command: 'curl -s http://192.168.1.98:80/super.cgi | awk "NR==8" | cut -c 1-4'
    unit_of_measurement: "°C"
  - platform: command_line
    name: Ofoehn Mode Temperature
    command: 'curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/getReg.cgi'
    value_template: >-
      {% set lines = value.split('\n') %}
      {% set line1 = lines[0] %}
      {% set line2 = lines[1] %}
      {% set line3 = lines[2] %}
      {% set line4 = lines[3] %}
      {% if line1 == 'Chaud' %}
        {{ line3 }}
      {% elif line1 == 'Froid' %}
        {{ line2 }}
      {% elif line1 == 'Auto' %}
        {{ line4 }}
      {% else %}
        Valeur inconnue
      {% endif %}
    unit_of_measurement: "°C"
  - platform: command_line
    name: Ofoehn Power WiFi
    command: 'curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/accueil.cgi | awk "NR==16"'
  - platform: command_line
    name: Ofoehn Name WiFi
    command: 'curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/accueil.cgi | awk "NR==15"'
  - platform: command_line
    name: Ofoehn Pump State
    command: 'curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/super.cgi | awk "NR==26"'
  - platform: command_line
    name: Ofoehn Filtration Mode
    command: 'curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/getReg.cgi | awk "NR==6"'
  - platform: command_line
    name: Ofoehn Mode
    command: 'curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/getReg.cgi | head -n 1'
  - platform: command_line
    name: Ofoehn Error
    command: (curl -s http://192.168.1.98:80/accueil.cgi | awk 'NR==8' | cut -d'>' -f2 | cut -d'<' -f1)
  - platform: command_line
    name: Ofoehn Flow
    command: (curl -s http://192.168.1.98:80/accueil.cgi | awk 'NR==9' | cut -d'>' -f2 | cut -d'<' -f1)
    value_template: >-
     {% if value == 'Pas de d&eacute;bit' %}
     {{ 'Pas de débit' }}
     {% else %}
     {{ value }}
     {% endif %}
  - platform: command_line
    name: Ofoehn State
    command: (curl -s http://192.168.1.98:80/accueil.cgi | awk 'NR==6' | cut -d'>' -f2 | cut -d'<' -f1)
    scan_interval: 10

voici automations.yaml

- alias: "Ofoehn Refresh"
  trigger:
    platform: time
    seconds: "/10"
  action:
    service: shell_command.ofoehn_cron

- alias: "Ofoehn Light On"
  trigger:
    platform: state
    entity_id: switch.ofoehn_light
    to: "on"
  action:
    service: shell_command.ofoehn_light_on

- alias: "Ofoehn Light Off"
  trigger:
    platform: state
    entity_id: switch.ofoehn_light
    to: "off"
  action:
    service: shell_command.ofoehn_light_off

- alias: "Ofoehn Set Temperature"
  trigger:
    platform: state
    entity_id: input_number.ofoehn_set_temp
  action:
    service: shell_command.ofoehn_set_temp
    data_template:
      temp: "{{ states('input_number.ofoehn_set_temp') | float }}"

- alias: "Ofoehn Set Mode Hot"
  trigger:
    platform: state
    entity_id: switch.ofoehn_mode_hot
    to: "on"
  action:
    service: shell_command.ofoehn_mode_hot

- alias: "Ofoehn Set Mode Cold"
  trigger:
    platform: state
    entity_id: switch.ofoehn_mode_cold
    to: "on"
  action:
    service: shell_command.ofoehn_mode_cold

- alias: "Ofoehn Set Mode Auto"
  trigger:
    platform: state
    entity_id: switch.ofoehn_mode_auto
    to: "on"
  action:
    service: shell_command.ofoehn_mode_auto
    
- alias: "Mettre à jour la température souhaitée"
  trigger:
    platform: state
    entity_id: input_number.ofoehn_desired_temp
  action:
    service: shell_command.ofoehn_set_temp

- alias: Set Initial Desired Temperature
  trigger:
   platform: state
   entity_id: sensor.ofoehn_state
  action:
   service: input_number.set_value
   entity_id: input_number.ofoehn_desired_temp
   data_template:
     value: "{{ trigger.to_state.state }}"

- alias: "Mettre en mode chaud"
  trigger:
    platform: state
    entity_id: switch.ofoehn_mode_hot
    to: "on"
  action:
    service: shell_command.ofoehn_mode_hot

- alias: "Mettre en mode froid"
  trigger:
    platform: state
    entity_id: switch.ofoehn_mode_cold
    to: "on"
  action:
    service: shell_command.ofoehn_mode_cold

- alias: "Mettre en mode auto"
  trigger:
    platform: state
    entity_id: switch.ofoehn_mode_auto
    to: "on"
  action:
    service: shell_command.ofoehn_mode_auto

et mon tableau de bord de la PAC

en attendant de trouver la solution, j’ai créé des switches 26 - 28 -29
image

avec les commandes suivantes dans configuration.yaml

shell_command:
  ofoehn_cron: 'curl http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/changeOnOff.cgi'
  #ofoehn_set_temp: 'curl "http://192.168.1.98:80/setReg.cgi/consigneChaud={{ states("input_number.ofoehn_desired_temp") }}"'
  ofoehn_set_temp: 'curl "http://192.168.1.98:80/setReg.cgi/consigneFroid={{ trigger.to_state.state }}&consigneChaud={{ trigger.to_state.state }}&consigneAuto={{ trigger.to_state.state }}"'
  ofoehn_set_chaud29: 'curl "http://192.168.1.98:80/setReg.cgi?mode=CHAUD&consigneChaud=29"'
  ofoehn_set_chaud28: 'curl "http://192.168.1.98:80/setReg.cgi?mode=CHAUD&consigneChaud=28"'
  ofoehn_set_chaud26: 'curl "http://192.168.1.98:80/setReg.cgi?mode=CHAUD&consigneChaud=26"'
  ofoehn_onoff: 'curl http://192.168.1.98:80/changeOnOff.cgi'
switch:
  - platform: template
    switches:
      ofoehn_power:
        value_template: "{{ is_state('sensor.ofoehn_state', 'ON') }}"
        turn_on:
          service: shell_command.ofoehn_onoff
        turn_off:
          service: shell_command.ofoehn_onoff
        friendly_name: OFoehn Power

  - platform: template
    switches:
      ofoehn_chaud28:
        value_template: "{{ is_state('sensor.ofoehn_state', 'ON') }}"
        turn_on:
          service: shell_command.ofoehn_set_chaud28
        turn_off:
          service: shell_command.ofoehn_set_chaud28
        friendly_name: OFoehn Chaud28

  - platform: template
    switches:
      ofoehn_chaud29:
        value_template: "{{ is_state('sensor.ofoehn_state', 'ON') }}"
        turn_on:
          service: shell_command.ofoehn_set_chaud29
        turn_off:
          service: shell_command.ofoehn_set_chaud29
        friendly_name: OFoehn Chaud29

  - platform: template
    switches:
      ofoehn_chaud26:
        value_template: "{{ is_state('sensor.ofoehn_state', 'ON') }}"
        turn_on:
          service: shell_command.ofoehn_set_chaud26
        turn_off:
          service: shell_command.ofoehn_set_chaud26
        friendly_name: OFoehn Chaud26

Bonjour à tous,

J’ai réussi grâce en grande partie a ChatGPT, à faire les scripts correctement:

ci-dessous mon fichier configuration.yaml


# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

# Text to speech
tts:
  - platform: google_translate

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

input_select:
  etat_mode_consigne:
    name: Mode PAC
    options:
      - État Froid
      - État Chaud
      - État Auto

input_number:
  ofoehn_desired_temp:
    name: Température souhaitée
    min: 15
    max: 30
    step: 1

input_text:
  ofoehn_ip:
    name: Adresse IP de la pompe à chaleur
    initial: "192.168.1.98"
  ofoehn_port:
    name: Port de la pompe à chaleur
    initial: "80"

shell_command:
  ofoehn_set_temp: 'curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/getReg.cgi'
  ofoehn_set_chaud: 'curl http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/setReg.cgi?mode=CHAUD'
  ofoehn_set_froid: 'curl http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/setReg.cgi?mode=FROID'
  ofoehn_set_auto: 'curl http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/setReg.cgi?mode=AUTO'
  set_temperature: 'curl http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/setReg.cgi?mode={{ states("sensor.ofoehn_mode") | upper }}&consigne{{ states("sensor.ofoehn_mode") }}={{ states("input_number.ofoehn_desired_temp") | int }}'
  ofoehn_onoff: 'curl http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/changeOnOff.cgi'

switch:
  - platform: template
    switches:
      ofoehn_power:
        value_template: "{{ is_state('sensor.ofoehn_state', 'ON') }}"
        turn_on:
          service: shell_command.ofoehn_onoff
        turn_off:
          service: shell_command.ofoehn_onoff
        friendly_name: OFoehn Power

sensor:
  - platform: command_line
    name: Debug Ofoehn IP
    command: 'echo "{{ states("input_text.ofoehn_ip") }}"'
    scan_interval: '00:00:20'
  - platform: command_line
    name: Debug Ofoehn Port
    command: 'echo "{{ states("input_text.ofoehn_port") }}"'
    scan_interval: '00:00:20'
  - platform: command_line
    name: Ofoehn Water In
    command: 'curl -s http://192.168.1.98:80/super.cgi | awk "NR==6" | cut -c 1-4'
    unit_of_measurement: "°C"
    scan_interval: '00:00:20'
  - platform: command_line
    name: Ofoehn Water Out
    command: 'curl -s http://192.168.1.98:80/super.cgi | awk "NR==7" | cut -c 1-4'
    unit_of_measurement: "°C"
    scan_interval: '00:00:20'
  - platform: command_line
    name: Ofoehn Air Temperature
    command: 'curl -s http://192.168.1.98:80/super.cgi | awk "NR==8" | cut -c 1-4'
    unit_of_measurement: "°C"
    scan_interval: '00:00:20'
  - platform: command_line
    name: Ofoehn Mode Temperature
    command: 'curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/getReg.cgi'
    value_template: >-
      {% set lines = value.split('\n') %}
      {% set line1 = lines[0] %}
      {% set line2 = lines[1] %}
      {% set line3 = lines[2] %}
      {% set line4 = lines[3] %}
      {% if line1 == 'Chaud' %}
        {{ line3 }}
      {% elif line1 == 'Froid' %}
        {{ line2 }}
      {% elif line1 == 'Auto' %}
        {{ line4 }}
      {% else %}
        Valeur inconnue
      {% endif %}
    unit_of_measurement: "°C"
    scan_interval: '00:00:20'
  - platform: command_line
    name: Ofoehn Power WiFi
    command: 'curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/accueil.cgi | awk "NR==16"'
    scan_interval: '00:00:20'
  - platform: command_line
    name: Ofoehn Name WiFi
    command: 'curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/accueil.cgi | awk "NR==15"'
    scan_interval: '00:00:20'
  - platform: command_line
    name: Ofoehn Pump State
    command: 'curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/super.cgi | awk "NR==26"'
    scan_interval: '00:00:20'
  - platform: command_line
    name: Ofoehn Filtration Mode
    command: 'curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/getReg.cgi | awk "NR==6"'
    scan_interval: '00:00:20'
  - platform: command_line
    name: Ofoehn Mode
    command: 'curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/getReg.cgi | head -n 1'
    scan_interval: '00:00:20'
  - platform: command_line
    name: Ofoehn Error
    command: (curl -s http://192.168.1.98:80/accueil.cgi | awk 'NR==8' | cut -d'>' -f2 | cut -d'<' -f1)
    scan_interval: '00:00:20'
  - platform: command_line
    name: Ofoehn Flow
    command: (curl -s http://192.168.1.98:80/accueil.cgi | awk 'NR==9' | cut -d'>' -f2 | cut -d'<' -f1)
    value_template: >-
     {% if value == 'Pas de d&eacute;bit' %}
     {{ 'Pas de débit' }}
     {% else %}
     {{ value }}
     {% endif %}
    scan_interval: '00:00:20'
  - platform: command_line
    name: Ofoehn State
    command: (curl -s http://192.168.1.98:80/accueil.cgi | awk 'NR==6' | cut -d'>' -f2 | cut -d'<' -f1)
    scan_interval: '00:00:20'

et le fichier automations.yaml

- alias: "Ofoehn Light On"
  trigger:
    platform: state
    entity_id: switch.ofoehn_light
    to: "on"
  action:
    service: shell_command.ofoehn_light_on

- alias: "Ofoehn Light Off"
  trigger:
    platform: state
    entity_id: switch.ofoehn_light
    to: "off"
  action:
    service: shell_command.ofoehn_light_off

- alias: Envoyer la commande en fonction de l'état à mode PAC
  trigger:
    platform: state
    entity_id: input_select.etat_mode_consigne
  action:
    service_template: >
      {% if is_state('input_select.etat_mode_consigne', 'État Chaud') %}
        shell_command.ofoehn_set_chaud
      {% elif is_state('input_select.etat_mode_consigne', 'État Froid') %}
        shell_command.ofoehn_set_froid
      {% elif is_state('input_select.etat_mode_consigne', 'État Auto') %}
        shell_command.ofoehn_set_auto
      {% endif %}

- id: mettre_a_jour_temperature
  alias: Mettre à jour la température
  trigger:
    - platform: state
      entity_id: input_number.ofoehn_desired_temp
  action:
    - service: shell_command.set_temperature

pour un affichage suivant
image
avec le code suivant
type: entities
entities:

  • entity: switch.ofoehn_power
  • entity: sensor.ofoehn_state
    name: Etat électrique
  • entity: input_select.etat_mode_consigne
  • entity: sensor.ofoehn_mode
    name: Mode PAC réel
  • entity: input_number.ofoehn_desired_temp
  • entity: sensor.ofoehn_mode_temperature
    name: Mode température réel
  • entity: sensor.ofoehn_air_temperature
    name: Température de l’air
    title: PAC
    show_header_toggle: false

Bonjour,
Pardonnez ma question peut être un peu simple, mais dans quel fichier exe exécutez vous vos script? En effet, j’ai des problème de panneaux de commande avec ma PAC ACCESS 8 de chez O’foenh. Et votre travail est très intéressant (je suis d’ailleurs assez épaté de votre programmation).

Merci de votre retour.

Bonjour,

Attention dans la dernière version de Home Assistant cette programmation ne fonctionne plus

sinon il vous faut File Editor, via votre page web Home Assistant, allez dans paramètres / modules complémentaires et cliquez sur Boutique des modules complémentaires pour chercher File Editor
Dans File Editor (au même niveau que Paramètres), ouvrez /homeassistant/configuration.yaml
voici ma config sur ma PAC sans les infos persos:

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

input_select:
  etat_mode_consigne:
    name: Mode PAC
    options:
      - État Froid
      - État Chaud
      - État Auto

input_number:
  ofoehn_desired_temp:
    name: Température souhaitée
    min: 15
    max: 30
    step: 1

input_text:
  ofoehn_ip:
    name: Adresse IP de la pompe à chaleur
    initial: "192.168.1.98"
  ofoehn_port:
    name: Port de la pompe à chaleur
    initial: "80"

shell_command:
  ofoehn_set_temp: 'curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/getReg.cgi'
  ofoehn_set_chaud: 'curl http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/setReg.cgi?mode=CHAUD'
  ofoehn_set_froid: 'curl http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/setReg.cgi?mode=FROID'
  ofoehn_set_auto: 'curl http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/setReg.cgi?mode=AUTO'
  set_temperature: 'curl http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/setReg.cgi?mode={{ states("sensor.ofoehn_mode") | upper }}&consigne{{ states("sensor.ofoehn_mode") }}={{ states("input_number.ofoehn_desired_temp") | int }}'
  ofoehn_onoff: 'curl http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/changeOnOff.cgi'

switch:
  - platform: template
    switches:
      ofoehn_power:
        value_template: "{{ is_state('sensor.ofoehn_state', 'ON') }}"
        turn_on:
          service: shell_command.ofoehn_onoff
        turn_off:
          service: shell_command.ofoehn_onoff
        friendly_name: OFoehn Power

sensor:
  - platform: command_line
    name: Debug Ofoehn IP
    command: 'echo "{{ states("input_text.ofoehn_ip") }}"'
    scan_interval: '00:00:20'
  - platform: command_line
    name: Debug Ofoehn Port
    command: 'echo "{{ states("input_text.ofoehn_port") }}"'
    scan_interval: '00:00:20'
  - platform: command_line
    name: Ofoehn Water In
    command: 'curl -s http://192.168.1.98:80/super.cgi | awk "NR==6" | cut -c 1-4'
    unit_of_measurement: "°C"
    scan_interval: '00:00:20'
  - platform: command_line
    name: Ofoehn Water Out
    command: 'curl -s http://192.168.1.98:80/super.cgi | awk "NR==7" | cut -c 1-4'
    unit_of_measurement: "°C"
    scan_interval: '00:00:20'
  - platform: command_line
    name: Ofoehn Air Temperature
    command: 'curl -s http://192.168.1.98:80/super.cgi | awk "NR==8" | cut -c 1-4'
    unit_of_measurement: "°C"
    scan_interval: '00:00:20'
  - platform: command_line
    name: Ofoehn Mode Temperature
    command: 'curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/getReg.cgi'
    value_template: >-
      {% set lines = value.split('\n') %}
      {% set line1 = lines[0] %}
      {% set line2 = lines[1] %}
      {% set line3 = lines[2] %}
      {% set line4 = lines[3] %}
      {% if line1 == 'Chaud' %}
        {{ line3 }}
      {% elif line1 == 'Froid' %}
        {{ line2 }}
      {% elif line1 == 'Auto' %}
        {{ line4 }}
      {% else %}
        Valeur inconnue
      {% endif %}
    unit_of_measurement: "°C"
    scan_interval: '00:00:20'
  - platform: command_line
    name: Ofoehn Power WiFi
    command: 'curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/accueil.cgi | awk "NR==16"'
    scan_interval: '00:00:20'
  - platform: command_line
    name: Ofoehn Name WiFi
    command: 'curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/accueil.cgi | awk "NR==15"'
    scan_interval: '00:00:20'
  - platform: command_line
    name: Ofoehn Pump State
    command: 'curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/super.cgi | awk "NR==26"'
    scan_interval: '00:00:20'
  - platform: command_line
    name: Ofoehn Filtration Mode
    command: 'curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/getReg.cgi | awk "NR==6"'
    scan_interval: '00:00:20'
  - platform: command_line
    name: Ofoehn Mode
    command: 'curl -s http://"{{ states("input_text.ofoehn_ip") }}":"{{ states("input_text.ofoehn_port") }}"/getReg.cgi | head -n 1'
    scan_interval: '00:00:20'
  - platform: command_line
    name: Ofoehn Error
    command: (curl -s http://192.168.1.98:80/accueil.cgi | awk 'NR==8' | cut -d'>' -f2 | cut -d'<' -f1)
    scan_interval: '00:00:20'
  - platform: command_line
    name: Ofoehn Flow
    command: (curl -s http://192.168.1.98:80/accueil.cgi | awk 'NR==9' | cut -d'>' -f2 | cut -d'<' -f1)
    value_template: >-
     {% if value == 'Pas de d&eacute;bit' %}
     {{ 'Pas de débit' }}
     {% else %}
     {{ value }}
     {% endif %}
    scan_interval: '00:00:20'
  - platform: command_line
    name: Ofoehn State
    command: (curl -s http://192.168.1.98:80/accueil.cgi | awk 'NR==6' | cut -d'>' -f2 | cut -d'<' -f1)
    scan_interval: '00:00:20'

et dans /homeassistant/automations.yaml

- alias: Ofoehn Light On
  trigger:
    platform: state
    entity_id: switch.ofoehn_light
    to: 'on'
  action:
    service: shell_command.ofoehn_light_on
  id: xxxxxxxxxx
- alias: Ofoehn Light Off
  trigger:
    platform: state
    entity_id: switch.ofoehn_light
    to: 'off'
  action:
    service: shell_command.ofoehn_light_off
  id: xxxxxxxxxx
- alias: Envoyer la commande en fonction de l'état à mode PAC
  trigger:
    platform: state
    entity_id: input_select.etat_mode_consigne
  action:
    service_template: "{% if is_state('input_select.etat_mode_consigne', 'État Chaud')
      %}\n  shell_command.ofoehn_set_chaud\n{% elif is_state('input_select.etat_mode_consigne',
      'État Froid') %}\n  shell_command.ofoehn_set_froid\n{% elif is_state('input_select.etat_mode_consigne',
      'État Auto') %}\n  shell_command.ofoehn_set_auto\n{% endif %}\n"
  id: xxxxxxxxxx
- id: mettre_a_jour_temperature
  alias: Mettre à jour la température
  trigger:
  - platform: state
    entity_id: input_number.ofoehn_desired_temp
  action:
  - service: shell_command.set_temperature

Bien cordialement