Voila le generic_thermostat
:
climate:
- platform: generic_thermostat
name: Bedroom thermostat
heater: input_boolean.bedroom_should_heat
target_sensor: sensor.bedroom_thermometer_temperature
target_temp: 20
min_cycle_duration:
seconds: 60
initial_hvac_mode: 'off'
away_temp: 15.5
precision: 0.1
L’input_boolean
qui permet de faire chauffer le module :
input_boolean:
bedroom_should_heat:
name: Bedroom heater should heat
Et l’automatisation qui permute le mode du Heatzy en fonction de l’input_boolean
(je te laisse l’automatisation telle quelle, avec mes différents radiateurs du coup) :
- alias: Climate - Toggle heater when should_heat toggled
description: 'Toggle heater when should_heat toggled'
mode: queued
trigger:
- platform: state
entity_id: input_boolean.bedroom_should_heat
- platform: state
entity_id: input_boolean.office_should_heat
- platform: state
entity_id: input_boolean.living_room_should_heat
action:
- choose:
- conditions: >
{{ trigger.to_state.state == 'on' }}
sequence:
- service: climate.set_preset_mode
target:
entity_id: >
{% if trigger.entity_id == 'input_boolean.bedroom_should_heat' %}
climate.chambre
{% elif trigger.entity_id == 'input_boolean.office_should_heat' %}
climate.bureau
{% elif trigger.entity_id == 'input_boolean.living_room_should_heat' %}
climate.salon
{% endif %}
data_template:
preset_mode: 'comfort'
- conditions: >
{{ trigger.to_state.state == 'off' }}
sequence:
- service: climate.set_preset_mode
target:
entity_id: >
{% if trigger.entity_id == 'input_boolean.bedroom_should_heat' %}
climate.chambre
{% elif trigger.entity_id == 'input_boolean.office_should_heat' %}
climate.bureau
{% elif trigger.entity_id == 'input_boolean.living_room_should_heat' %}
climate.salon
{% endif %}
data_template:
preset_mode: 'eco'
Ce que je fait c’est que je mets mes generic_thermostat
en heat
ou off
en fonction de plages horaires :
- alias: Climate - Start bedroom heaters if needed
description: 'When period matches, should start bedroom and if guests mode enabled, office'
trigger:
- ## triggers sur plages horaires/vacances/etc
condition:
- ## conditions à respecter présence/etc
action:
- service: climate.set_hvac_mode
data:
hvac_mode: 'heat'
entity_id: climate.bedroom_thermostat
- alias: Climate - End bedroom and office heaters if needed
description: 'When period matches, should turn off bedroom and if guests mode enabled, office'
trigger:
- ## triggers sur plages horaires/vacances/etc
condition:
- ## conditions à respecter présence/etc
action:
- service: climate.set_hvac_mode
data:
hvac_mode: 'off'
entity_id: climate.bedroom_thermostat
Quand le thermostat est en mode heat
, cela gère l’input_boolean et donc les modes comfort/eco du Heatzy en fonction des températures min et max.
Quand le thermostat passe en off
, l’automatisation suivante permet de mettre les Heatzy en away :
- alias: Climate - Turn off heaters when thermostat turned off
description: 'When thermostat turned off, heaters should be turned off'
trigger:
- platform: state
entity_id: climate.bedroom_thermostat
to: 'off'
- platform: state
entity_id: climate.office_thermostat
to: 'off'
- platform: state
entity_id: climate.living_room_thermostat
to: 'off'
action:
- service: climate.set_preset_mode
data_template:
entity_id: >
{% if trigger.entity_id == 'climate.bedroom_thermostat' %}
climate.chambre
{% elif trigger.entity_id == 'climate.office_thermostat' %}
climate.bureau
{% elif trigger.entity_id == 'climate.living_room_thermostat' %}
climate.salon
{% endif %}
preset_mode: 'away'
Je pense que mon fonctionnement peut être grandement amélioré, mais comme ça a marché tout l’hiver dernier, je n’ose plus y toucher 
J’espère que c’est assez clair, n’hésites pas si ce n’est pas le cas 
Une dernière chose : j’ai remarqué que les Heatzy n’étaient pas en ligne à 100% du temps (inacessibles même dans l’appli Heatzy), j’ai donc fait une automatisation pour vérifier régulièrement qu’ils sont bien dans l’état dans lequel ils devraient être :
- alias: Climate - Check Heatzys and Thermostats are coherent
description: 'When thermostat turned off, check that Heatzy heaters are also turned off or turn them off'
trigger:
- platform: time_pattern
minutes: '/30'
condition:
- condition: state
entity_id: input_boolean.heaters_on
state: 'on'
action:
- choose:
- conditions:
- condition: state
entity_id: climate.bedroom_thermostat
state: 'off'
- condition: not
conditions:
- condition: state
entity_id: climate.chambre
attribute: preset_mode
state: 'away'
sequence:
- service: climate.set_preset_mode
data:
entity_id: climate.chambre
preset_mode: 'away'
- choose:
- conditions:
- condition: state
entity_id: climate.office_thermostat
state: 'off'
- condition: not
conditions:
- condition: state
entity_id: climate.bureau
attribute: preset_mode
state: 'away'
sequence:
- service: climate.set_preset_mode
data:
entity_id: climate.bureau
preset_mode: 'away'
- choose:
- conditions:
- condition: state
entity_id: climate.living_room_thermostat
state: 'off'
- condition: not
conditions:
- condition: state
entity_id: climate.salon
attribute: preset_mode
state: 'away'
sequence:
- service: climate.set_preset_mode
data:
entity_id: climate.salon
preset_mode: 'away'