# Versatile thermostat + heatzy + local tuya... need help

**URL:** <https://forum.hacf.fr/t/versatile-thermostat-heatzy-local-tuya-need-help/35216>\
**Category:** Entraide Home Assistant\
**Tags:** chauffage\
**Created:** [Janvier 23, 2024, 10:32 UTC](https://forum.hacf.fr/t/versatile-thermostat-heatzy-local-tuya-need-help/35216 "2024-01-23T22:32:53Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![AGeille](https://forum.hacf.fr/user_avatar/forum.hacf.fr/ageille/32/77797_2.png) [@AGeille](https://forum.hacf.fr/u/AGeille)\
**Post date:** [Novembre 4, 2024, 9:01 UTC](https://forum.hacf.fr/t/versatile-thermostat-heatzy-local-tuya-need-help/35216/21 "2024-11-04T09:01:34Z")

</div>

@Jean-Marc_Collin je débute tout juste avec HA aurais tu un pointeur pour me dire comment tester en direct? car je n’ai jamais fait ça. Merci

---

<div class="post-metadata">

**Author:** ![Jean-Marc\_Collin](https://forum.hacf.fr/user_avatar/forum.hacf.fr/jean-marc_collin/32/10881_2.png) [@Jean-Marc\_Collin](https://forum.hacf.fr/u/Jean-Marc_Collin)\
**Post date:** [Novembre 4, 2024, 9:03 UTC](https://forum.hacf.fr/t/versatile-thermostat-heatzy-local-tuya-need-help/35216/22 "2024-11-04T09:03:54Z")

</div>

Oui tu vas dans Paramètres/Entités. Tu cherches ton Switch et tu pourras cliquer sur le bouton on/off.

---

<div class="post-metadata">

**Author:** ![AGeille](https://forum.hacf.fr/user_avatar/forum.hacf.fr/ageille/32/77797_2.png) [@AGeille](https://forum.hacf.fr/u/AGeille)\
**Post date:** [Novembre 4, 2024, 9:08 UTC](https://forum.hacf.fr/t/versatile-thermostat-heatzy-local-tuya-need-help/35216/23 "2024-11-04T09:08:11Z")

</div>

@Jean-Marc_Collin le switch.bureau\_adrien ne marche pas il n’active que le cadenas le climate.bureau\_adrien en revanche fonctionne nickel lui.

---

<div class="post-metadata">

**Author:** ![Gael1980](https://forum.hacf.fr/user_avatar/forum.hacf.fr/gael1980/32/8958_2.png) [@Gael1980](https://forum.hacf.fr/u/Gael1980)\
**Post date:** [Novembre 4, 2024, 9:16 UTC](https://forum.hacf.fr/t/versatile-thermostat-heatzy-local-tuya-need-help/35216/24 "2024-11-04T09:16:49Z")

</div>

Et lorsque tu active directement le service climate.set\_preset\_mode en eco ou confort à partir de l’onglet outils de développement / Actions ?

---

<div class="post-metadata">

**Author:** ![AGeille](https://forum.hacf.fr/user_avatar/forum.hacf.fr/ageille/32/77797_2.png) [@AGeille](https://forum.hacf.fr/u/AGeille)\
**Post date:** [Novembre 4, 2024, 9:19 UTC](https://forum.hacf.fr/t/versatile-thermostat-heatzy-local-tuya-need-help/35216/25 "2024-11-04T09:19:31Z")

</div>

> [@Gael1980](#):
>
> climate.set\_preset\_mode

@Gael1980 ça marche

 ![image](https://forum.hacf.fr/uploads/default/original/3X/5/b/5b6f3ae8421e8b4ccedba7a93d4f7aea1af76cf5.png)

---

<div class="post-metadata">

**Author:** ![Gael1980](https://forum.hacf.fr/user_avatar/forum.hacf.fr/gael1980/32/8958_2.png) [@Gael1980](https://forum.hacf.fr/u/Gael1980)\
**Post date:** [Novembre 4, 2024, 9:26 UTC](https://forum.hacf.fr/t/versatile-thermostat-heatzy-local-tuya-need-help/35216/26 "2024-11-04T09:26:34Z")

</div>

Lorsque tu appuie sur exécuter l’action, il passe bien en eco ou comfort ?  
Tu peux te mettre en mode : passez en mode yaml et me montrer le code ?

---

<div class="post-metadata">

**Author:** ![AGeille](https://forum.hacf.fr/user_avatar/forum.hacf.fr/ageille/32/77797_2.png) [@AGeille](https://forum.hacf.fr/u/AGeille)\
**Post date:** [Novembre 4, 2024, 9:29 UTC](https://forum.hacf.fr/t/versatile-thermostat-heatzy-local-tuya-need-help/35216/27 "2024-11-04T09:29:07Z")

</div>

oui ça fonctionne nickel:  
action: climate.set\_preset\_mode  
target:  
area\_id: bureau\_a  
data:  
preset\_mode: comfort

ou

action: climate.set\_preset\_mode  
target:  
area\_id: bureau\_a  
data:  
preset\_mode: eco

---

<div class="post-metadata">

**Author:** ![Gael1980](https://forum.hacf.fr/user_avatar/forum.hacf.fr/gael1980/32/8958_2.png) [@Gael1980](https://forum.hacf.fr/u/Gael1980)\
**Post date:** [Novembre 4, 2024, 9:30 UTC](https://forum.hacf.fr/t/versatile-thermostat-heatzy-local-tuya-need-help/35216/28 "2024-11-04T09:30:11Z")

</div>

tu peux choisir l’entitée à la place de appareil svp

---

<div class="post-metadata">

**Author:** ![AGeille](https://forum.hacf.fr/user_avatar/forum.hacf.fr/ageille/32/77797_2.png) [@AGeille](https://forum.hacf.fr/u/AGeille)\
**Post date:** [Novembre 4, 2024, 9:34 UTC](https://forum.hacf.fr/t/versatile-thermostat-heatzy-local-tuya-need-help/35216/29 "2024-11-04T09:34:00Z")

</div>

```auto
action: climate.set_preset_mode
target:
  entity_id: climate.chauffage_bureau_adrien
data:
  preset_mode: comfort

```

si c’est le code que tu as en tête il ne se passe strictement rien

---

<div class="post-metadata">

**Author:** ![Gael1980](https://forum.hacf.fr/user_avatar/forum.hacf.fr/gael1980/32/8958_2.png) [@Gael1980](https://forum.hacf.fr/u/Gael1980)\
**Post date:** [Novembre 4, 2024, 9:38 UTC](https://forum.hacf.fr/t/versatile-thermostat-heatzy-local-tuya-need-help/35216/30 "2024-11-04T09:38:03Z")

</div>

climate.chauffage\_bureau\_adrien, c’est bien le nom du heatzy ?

Il y a surement un doublon de nom entre le heatzy le le switch

dans ce code :

```auto
- platform: template
  switches:
    chauffage_bureau_adrien:
      unique_id: chauffage_bureau_adrien

```

essai de remplacer les chaufage\_bureau\_adrien par autre chose, genre ch\_bureau\_adrien

---

<div class="post-metadata">

**Author:** ![AGeille](https://forum.hacf.fr/user_avatar/forum.hacf.fr/ageille/32/77797_2.png) [@AGeille](https://forum.hacf.fr/u/AGeille)\
**Post date:** [Novembre 4, 2024, 9:46 UTC](https://forum.hacf.fr/t/versatile-thermostat-heatzy-local-tuya-need-help/35216/31 "2024-11-04T09:46:14Z")

</div>

sur le heatzy c’est id de l’entité: climate.bureau\_adrien

et j’ai mis à jour mon templates.yaml j’ai rechargé la config et redémarré.

```auto
- platform: template
  switches:
    ch_bureau_adrien:
      unique_id: ch_bureau_adrien
      friendly_name: Bureau Adrien
      value_template: "{{ is_state_attr('climate.ch_bureau_adrien', 'preset_mode', 'comfort') }}"
      icon_template: >-
        {% if is_state_attr('climate.ch_bureau_adrien', 'preset_mode', 'comfort') %}
          mdi:radiator
        {% elif is_state_attr('climate.ch_bureau_adrien', 'preset_mode', 'away') %}
          mdi:snowflake
        {% else %}
          mdi:radiator-disabled
        {% endif %}
      turn_on:
        service: climate.set_preset_mode
        entity_id: climate.ch_bureau_adrien
        data:
          preset_mode: 'comfort'
      turn_off:
        service: climate.set_preset_mode
        entity_id: climate.ch_bureau_adrien
        data:
          preset_mode: 'eco'

```

et ça me donne:

 ![image](https://forum.hacf.fr/uploads/default/original/3X/5/f/5f78e67a7aa524b73917dddac8568a97b8c6f203.png) ou  
 ![image](https://forum.hacf.fr/uploads/default/original/3X/9/4/9499375cb317412523ac601ae7fb71d4aafdd488.png)  
mais rien ne se passe.

---

<div class="post-metadata">

**Author:** ![Gael1980](https://forum.hacf.fr/user_avatar/forum.hacf.fr/gael1980/32/8958_2.png) [@Gael1980](https://forum.hacf.fr/u/Gael1980)\
**Post date:** [Novembre 4, 2024, 10:21 UTC](https://forum.hacf.fr/t/versatile-thermostat-heatzy-local-tuya-need-help/35216/32 "2024-11-04T10:21:06Z")

</div>

le ch\_bureau\_adrien est un switch.

dans le value\_template, icon\_template, turn\_on et turn\_off, il faut que tu laisse le nom du heatzy : climate.bureau\_adrien

---

<div class="post-metadata">

**Author:** ![AGeille](https://forum.hacf.fr/user_avatar/forum.hacf.fr/ageille/32/77797_2.png) [@AGeille](https://forum.hacf.fr/u/AGeille)\
**Post date:** [Novembre 4, 2024, 10:26 UTC](https://forum.hacf.fr/t/versatile-thermostat-heatzy-local-tuya-need-help/35216/33 "2024-11-04T10:26:34Z")

</div>

@Gael1980 ok j’ai modifié chargé et redémarré ça ne marche toujours pas

```auto
- platform: template
  switches:
    ch_bureau_adrien:
      unique_id: ch_bureau_adrien
      friendly_name: Bureau Adrien
      value_template: "{{ is_state_attr('climate.bureau_adrien', 'preset_mode', 'comfort') }}"
      icon_template: >-
        {% if is_state_attr('climate.bureau_adrien', 'preset_mode', 'comfort') %}
          mdi:radiator
        {% elif is_state_attr('climate.bureau_adrien', 'preset_mode', 'away') %}
          mdi:snowflake
        {% else %}
          mdi:radiator-disabled
        {% endif %}
      turn_on:
        service: climate.set_preset_mode
        entity_id: climate.bureau_adrien
        data:
          preset_mode: 'comfort'
      turn_off:
        service: climate.set_preset_mode
        entity_id: climate.bureau_adrien
        data:
          preset_mode: 'eco'

```

 ![image](https://forum.hacf.fr/uploads/default/original/3X/7/c/7c08a41922e88809b1f4699beea66e41d35ed418.png)

---

<div class="post-metadata">

**Author:** ![Gael1980](https://forum.hacf.fr/user_avatar/forum.hacf.fr/gael1980/32/8958_2.png) [@Gael1980](https://forum.hacf.fr/u/Gael1980)\
**Post date:** [Novembre 4, 2024, 10:28 UTC](https://forum.hacf.fr/t/versatile-thermostat-heatzy-local-tuya-need-help/35216/34 "2024-11-04T10:28:33Z")

</div>

non, pour le ch\_bureau\_adrien ce n’est pas un set\_preset\_mode.  
il faut que tu utilise : Paramètres/Entités. Tu cherches ton Switch et tu pourras cliquer sur le bouton on/off.

---

<div class="post-metadata">

**Author:** ![AGeille](https://forum.hacf.fr/user_avatar/forum.hacf.fr/ageille/32/77797_2.png) [@AGeille](https://forum.hacf.fr/u/AGeille)\
**Post date:** [Novembre 4, 2024, 10:30 UTC](https://forum.hacf.fr/t/versatile-thermostat-heatzy-local-tuya-need-help/35216/35 "2024-11-04T10:30:53Z")

</div>

> [@AGeille](#):
>
> `ch_bureau_adrien`

maintenant ça marche 🙂

---

<div class="post-metadata">

**Author:** ![Gael1980](https://forum.hacf.fr/user_avatar/forum.hacf.fr/gael1980/32/8958_2.png) [@Gael1980](https://forum.hacf.fr/u/Gael1980)\
**Post date:** [Novembre 4, 2024, 10:32 UTC](https://forum.hacf.fr/t/versatile-thermostat-heatzy-local-tuya-need-help/35216/36 "2024-11-04T10:32:56Z")

</div>

cool.  
Maintenant soit dans ton generic thermostat, soit dans v\_therm en mode over switch, tu rajoute le switch ch\_bureau\_adrien  
et normalement, cela devrait être bon

---

<div class="post-metadata">

**Author:** ![AGeille](https://forum.hacf.fr/user_avatar/forum.hacf.fr/ageille/32/77797_2.png) [@AGeille](https://forum.hacf.fr/u/AGeille)\
**Post date:** [Novembre 4, 2024, 10:35 UTC](https://forum.hacf.fr/t/versatile-thermostat-heatzy-local-tuya-need-help/35216/37 "2024-11-04T10:35:28Z")

</div>

@Gael1980 dernière question comment tu prends en compte la mise à jour heatzy pour comfort, comfort-1,comfort-2, eco, frost, off dans ton code?

---

<div class="post-metadata">

**Author:** ![Gael1980](https://forum.hacf.fr/user_avatar/forum.hacf.fr/gael1980/32/8958_2.png) [@Gael1980](https://forum.hacf.fr/u/Gael1980)\
**Post date:** [Novembre 4, 2024, 10:42 UTC](https://forum.hacf.fr/t/versatile-thermostat-heatzy-local-tuya-need-help/35216/38 "2024-11-04T10:42:06Z")

</div>

J’utilise de vieux modules Heatzy qui ne prennent pas en charge les modes comfort-1 et comfort-2. En utilisant un switch avec un thermostat (générique ou vtherm), je suis donc limité aux modes comfort ou eco.

Pour pouvoir basculer mes radiateurs en mode Hors Gel (HG) ou Off, j’ai créé un sélecteur avec les options «&nbsp;Auto&nbsp;», «&nbsp;HG&nbsp;» et «&nbsp;Off&nbsp;».

Quand je sélectionne HG ou Off, le thermostat est désactivé, et j’envoie le mode frost\_protection ou Off au module Heatzy. En choisissant l’option Auto, le thermostat est réactivé.

---

<div class="post-metadata">

**Author:** ![Jean-Marc\_Collin](https://forum.hacf.fr/user_avatar/forum.hacf.fr/jean-marc_collin/32/10881_2.png) [@Jean-Marc\_Collin](https://forum.hacf.fr/u/Jean-Marc_Collin)\
**Post date:** [Novembre 4, 2024, 4:00 UTC](https://forum.hacf.fr/t/versatile-thermostat-heatzy-local-tuya-need-help/35216/39 "2024-11-04T16:00:57Z")

</div>

Merci @Gael1980 pour ton aide !

---

<div class="post-metadata">

**Author:** ![AGeille](https://forum.hacf.fr/user_avatar/forum.hacf.fr/ageille/32/77797_2.png) [@AGeille](https://forum.hacf.fr/u/AGeille)\
**Post date:** [Novembre 4, 2024, 4:15 UTC](https://forum.hacf.fr/t/versatile-thermostat-heatzy-local-tuya-need-help/35216/40 "2024-11-04T16:15:46Z")

</div>

@Jean-Marc_Collin il semble que j’ai une config incomplète quand j’essaye de créer une intégration. J’ai essayé de regarder cette vieille video du journal de thomas mais il semble que c’est une très vieille version [https://www.youtube.com/watch?v=A-io2Xbq6\_I&t=797s](https://www.youtube.com/watch?v=A-io2Xbq6_I&t=797s).

Que me conseilles tu ?  
Configuration centrale puis thermostat sur un switch?

Je suis en tout électrique avec Heatzy + les sondes aqara et bientôt les détecteurs d’ouvertures de fenêtre aqara également.  
Merci pou ton aide.

[Page précédente](https://forum.hacf.fr/t/versatile-thermostat-heatzy-local-tuya-need-help/35216.md?page=1)

[Page suivante](https://forum.hacf.fr/t/versatile-thermostat-heatzy-local-tuya-need-help/35216.md?page=3)
