Bonjour,
Je me suis amusé à faire une carte pour mon thermostat Netatmo et j’avais envie qu’elle ressemble à ce que l’on peut voir sur l’espace personnel du site Netatmo.
Je me suis appuyé sur l’intégration Netatmo ainsi que sur la carte « Éléments d’image » qui me semblait la plus adaptée à mon projet.
Je ne suis pas développeur et c’est pour cela que cette carte n’est surement pas la plus optimisée niveau code, mais chacun pourra apporter les modifications nécessaires afin de corriger mes erreurs.
Voici donc comment cela se présente :
J’ai intégré l’indicateur de chauffe mais aussi un témoin pour les modes: Hors Gel, Absent, Programmation et Manuel.
On trouve également l’indication du niveau de la batterie et le nom du Thermostat qui permet, lorsque l’on clique dessus d’accéder aux réglages avancés du thermostat.
Vous pouvez mettre le nom de votre fournisseur en changeant l’image « Engie » par la votre.
Les boutons « + » et « - » servent à monter ou baisser la température de consigne par pas de 0.5°, mais cette fonction ne donne pas entière satisfaction du fait que le retour d’info du thermostat prend un certain temps.
J’ai créer six sensors:
Les Sensors
- platform: template
sensors:
netatmo_temperature_courante:
# Remplacer "entree" par le nom de votre thermostat
friendly_name: Température Entrée
device_class: temperature
# Remplacer "entree" par le nom de votre thermostat
value_template: "{{ state_attr('climate.netatmo_entree', 'current_temperature') }}"
netatmo_temperature_consigne:
# Remplacer "entree" par le nom de votre thermostat
friendly_name: température consigne Entrée
device_class: temperature
# Remplacer "entree" par le nom de votre thermostat
value_template: "{{ state_attr('climate.netatmo_entree', 'temperature') }}"
netatmo_niveau_batterie:
# Remplacer "entree" par le nom de votre thermostat
friendly_name: Niveau Batterie Entrée
device_class: battery
unit_of_measurement: "%"
# Remplacer "entree" par le nom de votre thermostat
value_template: "{{ state_attr('climate.netatmo_entree', 'battery_level') }}"
netatmo_hvac_action:
# Remplacer "entree" par le nom de votre thermostat
friendly_name: Hvac action Entrée
# Remplacer "entree" par le nom de votre thermostat
value_template: "{{ state_attr('climate.netatmo_entree', 'hvac_action') }}"
netatmo_hvac_modes:
# Remplacer "entree" par le nom de votre thermostat
friendly_name: Hvac modes Entrée
# Remplacer "entree" par le nom de votre thermostat
value_template: "{{ state_attr('climate.netatmo_entree', 'hvac_modes') }}"
netatmo_preset_mode:
# Remplacer "entree" par le nom de votre thermostat
friendly_name: Preset mode Entrée
# Remplacer "entree" par le nom de votre thermostat
value_template: "{{ state_attr('climate.netatmo_entree', 'preset_mode') }}"
J’ai également eu besoin de 2 scripts pour les boutons « + » et « - »
Pour trouver le device id vous devez vous rendre dans configuration/appareils/ puis cliquer sur votre thermostat netatmo, le device id correspond au dernier chiffre dans la barre d’adresse de votre navigateur internet.
Les scripts
netatmo_increment_consigne:
alias: netatmo_increment_consigne
sequence:
- service: climate.set_temperature
target:
device_id: 5e9dcba177a540fd9e89c5cc9e9ecce0
data:
temperature: '{{(states.sensor.netatmo_temperature_consigne.state | float +
0.5)}}'
mode: single
netatmo_decrement_consigne:
alias: netatmo_decrement_consigne
sequence:
- service: climate.set_temperature
target:
device_id: 5e9dcba177a540fd9e89c5cc9e9ecce0
data:
temperature: '{{(states.sensor.netatmo_temperature_consigne.state | float -
0.5)}}'
mode: single
il ne reste plus que les 9 images à déposer dans le dossier « netatmo » qui sera créer dans le dossier « www ».
Pour cela vous faites un clic droit sur l’image puis enregistrer l’image sous…
Engie.png
Netatmo_background_409x762_2.png
Netatmo_chauffe.png
Netatmo_down.png
Netatmo_manual.png
Netatmo_up.png
Absent.png
Automatique.png
Hors Gel.png
Pour finir voici le code de la carte:
Le code de la carte
type: picture-elements
image: /local/netatmo/Netatmo_background_409x762_2.png
elements:
- type: image
entity: climate.netatmo_entree
image: /local/netatmo/Engie.png
title: null
tap_action:
action: none
style:
top: 10%
left: 90%
width: 10%
- type: image
entity: climate.netatmo_entree
title: Up Consigne
tap_action:
action: call-service
service: Script.netatmo_increment_consigne
hold_action:
action: more-info
image: /local/netatmo/Netatmo_up.png
style:
top: 52.6%
left: 76.5%
width: 6%
- type: image
entity: climate.netatmo_entree
title: Down Consigne
tap_action:
action: call-service
service: Script.netatmo_decrement_consigne
hold_action:
action: more-info
image: /local/netatmo/Netatmo_down.png
style:
top: 52.6%
left: 56.5%
width: 6%
- type: image
entity: sensor.netatmo_hvac_action
title: Temoin Chauffe
tap_action:
action: none
image: /local/netatmo/Netatmo_chauffe.png
style:
top: 58%
left: 25.5%
width: 7%
state_filter:
heating: brightness(100%) saturate(1)
idle: opacity(0%)
- type: image
entity: sensor.netatmo_preset_mode
title: Temoin Manual
tap_action:
action: none
image: /local/netatmo/Netatmo_manual.png
style:
top: 30%
left: 39%
width: 9%
state_filter:
manual: brightness(100%) saturate(1)
Schedule: opacity(0%)
away: opacity(0%)
Frost Guard: opacity(0%)
- type: image
entity: sensor.netatmo_preset_mode
title: Temoin Absent
tap_action:
action: none
image: /local/netatmo/Absent.png
style:
top: 29.8%
left: 38.6%
width: 11%
state_filter:
away: brightness(100%) saturate(1)
Schedule: opacity(0%)
manual: opacity(0%)
Frost Guard: opacity(0%)
- type: image
entity: sensor.netatmo_preset_mode
title: Temoin Hors Gel
tap_action:
action: none
image: /local/netatmo/Hors Gel.png
style:
top: 29.8%
left: 38.6%
width: 11%
state_filter:
Frost Guard: brightness(100%) saturate(1)
Schedule: opacity(0%)
manual: opacity(0%)
away: opacity(0%)
- type: image
entity: sensor.netatmo_preset_mode
title: Temoin Automatique
tap_action:
action: none
image: /local/netatmo/Automatique.png
style:
top: 29.9%
left: 39%
width: 11%
state_filter:
Schedule: brightness(100%) saturate(1)
away: opacity(0%)
manual: opacity(0%)
Frost Guard: opacity(0%)
- type: state-label
entity: sensor.netatmo_temperature_courante
unit_of_measurement: .
style:
top: 45%
left: 25.5%
font-size: 1.5em
color: black
font-weight: 600
- type: state-label
entity: sensor.netatmo_temperature_consigne
style:
top: 25%
left: 25.5%
font-size: 1em
color: white
font-weight: 600
- type: state-label
entity: climate.netatmo_entree
attribute: friendly_name
style:
top: 85%
left: 25.5%
font-size: 1.2em
color: black
font-weight: 400
- type: state-label
entity: sensor.thermostat_entree_battery_percent
tap_action:
action: none
style:
top: 76%
left: 88%
font-size: 0.7em
color: grey
font-weight: 600
- type: state-icon
entity: sensor.netatmo_niveau_batterie
title: Niveau Batterie
icon: mdi:battery-high
tap_action:
action: more-info
style:
top: 83%
left: 88%
'--paper-item-icon-color': grey
- Le 16/12/2021:
Ajout de trois nouveaux indicateurs du mode de fonctionnement,
Absent, Automatique, Hors Gel.
Et modification de la carte pour prendre en compte ces nouveaux indicateurs.
L’indicateur de batterie affiche maintenant correctement le niveau en % grâce au sensor disponible dans l’intégration netatmo.
sensor.thermostat_entree_battery_percent
- Le 28/01/2022:
Correction du code de la carte.
Suite au changement du nom de l’état qui passe de « boost » à « manual », le temoin du mode « manual » ne s’affiche plus.
Pour ceux qui auraient déja installé la carte, vous pouvez juste remplacer « boost » par « manual » dans les state_filter de chaque temoin d’état.
Voici l’exemple du code avant après pour l’état « Absent ».
A la lecture des différents échanges, je me suis dit qu’il serait intéressant de vous partager une évolution de cette carte.
Voici donc un aperçu de cette nouvelle carte.
Pour réaliser cette carte, je réutilise 90% des éléments de la version initiale.
vous avec donc besoin:
Des images de la première carte, ajoutez dans le même dossier l’image ci-dessous.
bouton_fond-300x98.png
Utilisez les même sensors.
Afin de mettre à jour immédiatement les indicateurs de mode de fonctionnement et de température de consigne sans attendre le retour par netatmo, j’utilise le service python_script pour les nouveaux scripts.
ces indicateurs seront ensuite actualisés lors du retour d’info par l’api netatmo.
Procédure d’installation du service python_script:
- Ajouter cette ligne dans le fichier configuration.yaml.
python_script:
- Créer un dossier nommé
python_scripts
dans le répertoire config - Créer un fichier dans le répertoire python_scripts avec le code ci-dessous et le nommer
set_state.py
- Redémarrer Hassio
set_state.py(ne rien changer dans ce fichier)
#==================================================================================================
# python_scripts/set_state.py
#==================================================================================================
# https://community.home-assistant.io/t/how-to-manually-set-state-value-of-sensor/43975/8
# voici un script mis à jour qui a été généralisé pour pouvoir définir n'importe quel attribut
#--------------------------------------------------------------------------------------------------
# Set the state or other attributes for the entity specified in the Automation Action
# Définir l'état ou d'autres attributs pour l'entité spécifiée dans l'action d'automatisation
#--------------------------------------------------------------------------------------------------
inputEntity = data.get('entity_id')
if inputEntity is None:
logger.warning("===== entity_id is required if you want to set something.")
else:
inputStateObject = hass.states.get(inputEntity)
inputState = inputStateObject.state
inputAttributesObject = inputStateObject.attributes.copy()
for item in data:
newAttribute = data.get(item)
logger.debug("===== item = {0}; value = {1}".format(item,newAttribute))
if item == 'entity_id':
continue # already handled
elif item == 'state':
inputState = newAttribute
else:
inputAttributesObject[item] = newAttribute
hass.states.set(inputEntity, inputState, inputAttributesObject)
#--------------------------------------------------------------------------------------------------
#Avec ce script en place, l'action pourrait être :
#--------------------------------------------------------------------------------------------------
# action:
#service: python_script.set_state
#data_template:
# entity_id: Binary_sensor.sensor1
# state: ON
# ou bien
#service: python_script.set_state
#data_template:
# entity_id: sensor.netatmo_temperature_consigne
# state: '{{(states.sensor.netatmo_temperature_consigne.state | float + 0.5)}}'
#--------------------------------------------------------------------------------------------------
# la bonne façon de passer un argument au script python est la suivante
# Remarquez que j'ai utilisé service_data : à la place de data_template
#--------------------------------------------------------------------------------------------------
#type: button
#entity: sensor.irrigation_icon_1
#tap_action:
# action: call-service
# service: python_script.hello_world
# service_data:
# nombre: jaime
Voici les nouveaux scripts (5):
copier ces lignes de code dans le fichier /config/scripts.yaml
,
Attention, si vous créez ces scripts via l’interface UI cela risque de ne pas fonctionner du fait que le script aura un id avec un numéro et pas le nom de l’alias.
nouveaux scripts(Changer le entity_id: dans ce fichier)
netatmo_increment_consigne:
alias: netatmo_increment_consigne
sequence:
- service: climate.set_temperature
data:
temperature: '{{(states.sensor.netatmo_temperature_consigne.state | float +
0.5)}}'
target:
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity_id: climate.netatmo_entree
- service: python_script.set_state
data_template:
entity_id: sensor.netatmo_temperature_consigne
state: '{{(states.sensor.netatmo_temperature_consigne.state | float + 0.5)}}'
mode: single
netatmo_decrement_consigne:
alias: netatmo_decrement_consigne
sequence:
- service: climate.set_temperature
data:
temperature: '{{(states.sensor.netatmo_temperature_consigne.state | float -
0.5)}}'
target:
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity_id: climate.netatmo_entree
- service: python_script.set_state
data_template:
entity_id: sensor.netatmo_temperature_consigne
state: '{{(states.sensor.netatmo_temperature_consigne.state | float - 0.5)}}'
mode: single
netatmo_mode_absent:
alias: netatmo_mode_absent
sequence:
- service: climate.set_preset_mode
target:
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity_id: climate.netatmo_entree
data:
preset_mode: away
- service: python_script.set_state
data_template:
entity_id: sensor.netatmo_preset_mode
state: away
mode: single
netatmo_mode_hors_gel:
alias: netatmo_mode_hors_gel
sequence:
- service: climate.set_preset_mode
target:
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity_id: climate.netatmo_entree
data:
preset_mode: Frost Guard
- service: python_script.set_state
data_template:
entity_id: sensor.netatmo_preset_mode
state: Frost Guard
mode: single
netatmo_mode_schedule:
alias: netatmo_mode_schedule
sequence:
- service: climate.set_preset_mode
target:
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity_id: climate.netatmo_entree
data:
preset_mode: Schedule
- service: python_script.set_state
data_template:
entity_id: sensor.netatmo_preset_mode
state: Schedule
mode: single
Pour finir voici le code de la carte:
Modifier toutes les lignes qui suivent un commentaire.
Code de la carte
type: picture-elements
image: /local/netatmo/Netatmo_background_409x762_2.png
elements:
- type: image
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity: climate.netatmo_entree
# Vous pouvez remplacer cette image par celle de votre opérateur
image: /local/netatmo/Engie.png
title: null
tap_action:
action: none
style:
top: 10%
left: 90%
width: 10%
- type: image
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity: climate.netatmo_entree
title: Up Consigne
tap_action:
action: call-service
service: Script.netatmo_increment_consigne
hold_action:
action: more-info
image: /local/netatmo/Netatmo_up.png
style:
top: 52.6%
left: 76.5%
width: 6%
- type: image
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity: climate.netatmo_entree
title: Down Consigne
tap_action:
action: call-service
service: Script.netatmo_decrement_consigne
hold_action:
action: more-info
image: /local/netatmo/Netatmo_down.png
style:
top: 52.6%
left: 56.5%
width: 6%
- type: image
entity: sensor.netatmo_hvac_action
title: Temoin Chauffe
tap_action:
action: none
image: /local/netatmo/Netatmo_chauffe.png
style:
top: 58%
left: 25.5%
width: 7%
state_filter:
heating: brightness(100%) saturate(1)
idle: opacity(0%)
- type: image
entity: sensor.netatmo_preset_mode
title: Temoin Manual
tap_action:
action: none
image: /local/netatmo/Netatmo_manual.png
style:
top: 30%
left: 39%
width: 9%
state_filter:
manual: brightness(100%) saturate(1)
Schedule: opacity(0%)
away: opacity(0%)
Frost Guard: opacity(0%)
- type: image
entity: sensor.netatmo_preset_mode
title: Mode de fonctionnement
tap_action:
action: none
image: /local/netatmo/Absent.png
style:
top: 29.8%
left: 38.6%
width: 11%
state_filter:
away: brightness(100%) saturate(1)
Schedule: opacity(0%)
manual: opacity(0%)
Frost Guard: opacity(0%)
- type: image
entity: sensor.netatmo_preset_mode
title: Mode de fonctionnement
tap_action:
action: none
image: /local/netatmo/Hors Gel.png
style:
top: 29.8%
left: 38.6%
width: 11%
state_filter:
Frost Guard: brightness(100%) saturate(1)
Schedule: opacity(0%)
manual: opacity(0%)
away: opacity(0%)
- type: image
entity: sensor.netatmo_preset_mode
title: Mode de fonctionnement
tap_action:
action: none
image: /local/netatmo/Automatique.png
style:
top: 29.9%
left: 39%
width: 11%
state_filter:
Schedule: brightness(100%) saturate(1)
away: opacity(0%)
manual: opacity(0%)
Frost Guard: opacity(0%)
- type: state-label
entity: sensor.netatmo_temperature_courante
unit_of_measurement: .
title: Température Actuelle
tap_action:
action: null
style:
top: 48%
left: 25.5%
font-size: 1.6em
color: black
font-weight: 600
- type: state-label
entity: sensor.netatmo_temperature_consigne
title: Température de consigne
tap_action:
action: null
style:
top: 25%
left: 25.5%
font-size: 1em
color: white
font-weight: 600
- type: state-label
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity: climate.netatmo_entree
attribute: friendly_name
style:
top: 25%
left: 66%
font-size: 1.4em
color: black
font-weight: 400
- type: state-label
entity: sensor.thermostat_entree_battery_percent
title: '% Batterie'
tap_action:
action: none
style:
top: 79%
left: 8.3%
font-size: 0.7em
color: grey
font-weight: 600
- type: state-icon
entity: sensor.netatmo_niveau_batterie
title: Niveau Batterie
icon: mdi:battery-high
tap_action:
action: more-info
style:
top: 86%
left: 8%
'--paper-item-icon-color': grey
- type: image
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity: climate.netatmo_entree
title: null
tap_action:
action: none
image: /local/netatmo/bouton_fond-300x98.png
style:
top: 83.2%
left: 71%
width: 58%
- type: image
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity: climate.netatmo_entree
title: Passer en Mode Absent
tap_action:
action: call-service
service: Script.netatmo_mode_absent
image: /local/netatmo/Absent.png
style:
top: 83%
left: 53%
width: 12%
- type: image
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity: climate.netatmo_entree
title: Passer en Mode Hors Gel
tap_action:
action: call-service
service: Script.netatmo_mode_hors_gel
image: /local/netatmo/Hors Gel.png
style:
top: 83.2%
left: 79.5%
width: 14.5%
- type: image
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity: climate.netatmo_entree
title: Passer en Mode Automatique
tap_action:
action: call-service
service: Script.netatmo_mode_schedule
image: /local/netatmo/Automatique.png
style:
top: 83.2%
left: 67%
width: 10%
Voilà, je pense n’avoir rien oublié
Les problèmes d’attentes de retour d’info par l’api netatmo sont toujours présents, mais ces nouveaux script permettent d’y palier en parti, ce n’est pas la solution idéale je l’avoue mais cela dépanne en attendant mieux.
Bonne bidouille !
- Le 26-10-2022:
Cette carte à beaucoup évolué depuis sa création, aussi je mets à disposition les derniers ajouts ici.
Tout d’abord merci à @Fabien_Jouet pour l’ajout de la gestion du planning, merci aussi à @jerome6994 pour l’ajout du bouton on/off.
Pour ceux qui ont déjà la carte d’installée, voici les 2 otpions récemment crées.
**Gestion du planning :
Ajoutez ces lignes dans votre carte.
Planning Carte
- type: state-label
entity: select.netatmo_domicile
title: Planning
icon: mdi:calendar
style:
top: 85%
left: 27%
'--paper-item-icon-color': rgb(68,68,68)
**Bouton on/off :
Ajoutez ces deux photos dans le répertoire « netatmo ».
Ajoutez ce script.
Modifier toutes les lignes qui suivent un commentaire.
script on/off
netatmo_on_off:
alias: Netatmo on/off
sequence:
- choose:
- conditions:
- condition: state
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity_id: climate.netatmo_entree
state: 'off'
sequence:
- service: climate.turn_on
data: {}
target:
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity_id: climate.netatmo_entree
- service: python_script.set_state
data_template:
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity_id: climate.netatmo_entree
state: auto
default:
- service: climate.turn_off
data: {}
target:
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity_id: climate.netatmo_entree
- service: python_script.set_state
data_template:
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity_id: climate.netatmo_entree
state: 'off'
temperature: 0
mode: single
Ajoutez ces lignes dans votre carte.
Modifier toutes les lignes qui suivent un commentaire.
on/off Carte
- type: image
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity: climate.netatmo_entree
title: On / Off
style:
top: 10%
left: 8%
width: 07%
state_image:
'off': /local/netatmo/netatmo-off.png
auto: /local/netatmo/netatmo-on.png
tap_action:
action: call-service
service: Script.netatmo_on_off
Pour ceux qui partent de zéro, voici comment faire :
Créez les 3 sensors à partir de ce fichier.
Modifier toutes les lignes qui suivent un commentaire.
Les 3 Sensors
- platform: template
sensors:
netatmo_temperature_consigne:
# Remplacer "Entrée" par le nom de votre thermostat
friendly_name: température consigne Entrée
#device_class: temperature
#unit_of_measurement: '°C'
# Remplacer "netatmo_entree" par le nom de votre thermostat
value_template: >
{% set tempcon = state_attr('climate.netatmo_entree', 'temperature') %}
{% if tempcon == 0 %}
OFF
{% else %}
{{ state_attr('climate.netatmo_entree', 'temperature') }}
{% endif %}
netatmo_hvac_action:
friendly_name: Hvac action Entrée
# Remplacer "netatmo_entree" par le nom de votre thermostat
value_template: "{{ state_attr('climate.netatmo_entree', 'hvac_action') }}"
netatmo_preset_mode:
# Remplacer "Entrée" par le nom de votre thermostat
friendly_name: Preset mode Entrée
# Remplacer "netatmo_entree" par le nom de votre thermostat
value_template: "{{ state_attr('climate.netatmo_entree', 'preset_mode') }}"
Créez les 6 scripts à partir de ce fichier.
Modifier toutes les lignes qui suivent un commentaire.
Les 6 Scripts
netatmo_increment_consigne:
alias: netatmo_increment_consigne
sequence:
- service: climate.set_temperature
data:
temperature: '{{(states.sensor.netatmo_temperature_consigne.state | float +
0.5)}}'
target:
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity_id: climate.netatmo_entree
- service: python_script.set_state
data_template:
entity_id: sensor.netatmo_temperature_consigne
state: '{{(states.sensor.netatmo_temperature_consigne.state | float + 0.5)}}'
mode: single
netatmo_decrement_consigne:
alias: netatmo_decrement_consigne
sequence:
- service: climate.set_temperature
data:
temperature: '{{(states.sensor.netatmo_temperature_consigne.state | float -
0.5)}}'
target:
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity_id: climate.netatmo_entree
- service: python_script.set_state
data_template:
entity_id: sensor.netatmo_temperature_consigne
state: '{{(states.sensor.netatmo_temperature_consigne.state | float - 0.5)}}'
mode: single
netatmo_mode_absent:
alias: netatmo_mode_absent
sequence:
- service: climate.set_preset_mode
target:
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity_id: climate.netatmo_entree
data:
preset_mode: away
- service: python_script.set_state
data_template:
entity_id: sensor.netatmo_preset_mode
state: away
mode: single
netatmo_mode_hors_gel:
alias: netatmo_mode_hors_gel
sequence:
- service: climate.set_preset_mode
target:
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity_id: climate.netatmo_entree
data:
preset_mode: Frost Guard
- service: python_script.set_state
data_template:
entity_id: sensor.netatmo_preset_mode
state: Frost Guard
mode: single
netatmo_mode_schedule:
alias: netatmo_mode_schedule
sequence:
- service: climate.set_preset_mode
target:
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity_id: climate.netatmo_entree
data:
preset_mode: Schedule
- service: python_script.set_state
data_template:
entity_id: sensor.netatmo_preset_mode
state: Schedule
mode: single
netatmo_on_off:
alias: Netatmo on/off
sequence:
- choose:
- conditions:
- condition: state
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity_id: climate.netatmo_entree
state: 'off'
sequence:
- service: climate.turn_on
data: {}
target:
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity_id: climate.netatmo_entree
- service: python_script.set_state
data_template:
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity_id: climate.netatmo_entree
state: auto
default:
- service: climate.turn_off
data: {}
target:
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity_id: climate.netatmo_entree
- service: python_script.set_state
data_template:
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity_id: climate.netatmo_entree
state: 'off'
temperature: 0
mode: single
Ajouter le service python_script, en suivant la procédure décrite précédemment.
Copiez les 12 images (voir tableau récap) mises à dispositions précédemment, dans le dossier « netatmo » qui sera créer dans le dossier « www ».
Pour cela vous faites un clic droit sur l’image puis enregistrer l’image sous…
Créez une nouvelle carte avec le code suivant.
Modifier toutes les lignes qui suivent un commentaire.
La Carte
type: picture-elements
image: /local/netatmo/Netatmo_background_409x762_2.png
elements:
- type: image
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity: climate.netatmo_entree
# Vous pouvez remplacer cette image par celle de votre opérateur
image: /local/netatmo/Engie.png
title: null
tap_action:
action: none
style:
top: 10%
left: 90%
width: 10%
- type: image
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity: climate.netatmo_entree
title: Up Consigne
tap_action:
action: call-service
service: Script.netatmo_increment_consigne
hold_action:
action: more-info
image: /local/netatmo/Netatmo_up.png
style:
top: 52.6%
left: 76.5%
width: 6%
- type: image
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity: climate.netatmo_entree
title: Down Consigne
tap_action:
action: call-service
service: Script.netatmo_decrement_consigne
hold_action:
action: more-info
image: /local/netatmo/Netatmo_down.png
style:
top: 52.6%
left: 56.5%
width: 6%
- type: image
entity: sensor.netatmo_hvac_action
title: Temoin Chauffe
tap_action:
action: none
image: /local/netatmo/Netatmo_chauffe.png
style:
top: 58%
left: 25.5%
width: 7%
state_filter:
heating: brightness(100%) saturate(1)
idle: opacity(0%)
- type: image
entity: sensor.netatmo_preset_mode
title: Mode de fonctionnement
style:
top: 29.9%
left: 39%
width: 11%
state_image:
manual: /local/netatmo/Netatmo_manual.png
Schedule: /local/netatmo/Automatique.png
away: /local/netatmo/Absent.png
Frost Guard: /local/netatmo/Hors Gel.png
tap_action:
action: none
- type: state-label
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity: climate.netatmo_entree
attribute: current_temperature
unit_of_measurement: .
title: Température Actuelle
tap_action:
action: null
style:
top: 48%
left: 25.5%
font-size: 1.6em
color: black
font-weight: 600
- type: state-label
entity: sensor.netatmo_temperature_consigne
title: Température de consigne
tap_action:
action: null
style:
top: 25%
left: 25.5%
font-size: 1em
color: white
font-weight: 600
- type: state-label
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity: climate.netatmo_entree
attribute: friendly_name
style:
top: 25%
left: 66%
font-size: 1.4em
color: black
font-weight: 400
- type: state-label
# Remplacer "sensor.thermostat_entree_battery_percent" par le sensor de votre thermostat
entity: sensor.thermostat_entree_battery_percent
title: '% Batterie'
tap_action:
action: none
style:
top: 79%
left: 8.3%
font-size: 0.7em
color: grey
font-weight: 600
- type: state-icon
# Remplacer "sensor.thermostat_entree_battery_percent" par le sensor de votre thermostat
entity: sensor.thermostat_entree_battery_percent
title: Niveau Batterie
icon: mdi:battery-high
tap_action:
action: more-info
style:
top: 86%
left: 8%
'--paper-item-icon-color': grey
- type: image
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity: climate.netatmo_entree
title: null
tap_action:
action: none
image: /local/netatmo/bouton_fond-300x98.png
style:
top: 83.2%
left: 71%
width: 58%
- type: image
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity: climate.netatmo_entree
title: Passer en Mode Absent
tap_action:
action: call-service
service: Script.netatmo_mode_absent
image: /local/netatmo/Absent.png
style:
top: 83%
left: 53%
width: 12%
- type: image
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity: climate.netatmo_entree
title: Passer en Mode Hors Gel
tap_action:
action: call-service
service: Script.netatmo_mode_hors_gel
image: /local/netatmo/Hors Gel.png
style:
top: 83.2%
left: 79.5%
width: 14.5%
- type: image
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity: climate.netatmo_entree
title: Passer en Mode Automatique
tap_action:
action: call-service
service: Script.netatmo_mode_schedule
image: /local/netatmo/Automatique.png
style:
top: 83.2%
left: 67%
width: 10%
- type: state-label
entity: select.netatmo_domicile
title: Planning
icon: mdi:calendar
style:
top: 85%
left: 27%
'--paper-item-icon-color': rgb(68,68,68)
- type: image
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity: climate.netatmo_entree
title: On / Off
style:
top: 10%
left: 8%
width: 07%
state_image:
'off': /local/netatmo/netatmo-off.png
auto: /local/netatmo/netatmo-on.png
tap_action:
action: call-service
service: Script.netatmo_on_off
L’optimisation de cette nouvelle carte a permis de réduire le nombre de sensors.
Voici également un tableau récapitilatif de ce dont nous avons besoin pour cette carte,
et un apperçu de cette nouvelle carte:

Voilà, c’est tout pour l’instant.
Bonne bidouille !
- Le 16-11-2024:
Suite à plusieurs changements dans l’API Netatmo, je mets à disposition les dernières corrections ici.
Scripts
netatmo_mode_hors_gel:
alias: netatmo_mode_hors_gel
sequence:
- service: climate.set_preset_mode
target:
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity_id: climate.netatmo_entree
data:
preset_mode: frost_guard
- service: python_script.set_state
data_template:
entity_id: sensor.netatmo_preset_mode
state: frost_guard
mode: single
netatmo_mode_schedule:
alias: netatmo_mode_schedule
sequence:
- service: climate.set_preset_mode
target:
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity_id: climate.netatmo_entree
data:
preset_mode: schedule
- service: python_script.set_state
data_template:
entity_id: sensor.netatmo_preset_mode
state: schedule
Carte
type: picture-elements
image: /local/netatmo/Netatmo_background_409x762_2.png
elements:
- type: image
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity: climate.netatmo_entree
# Vous pouvez remplacer cette image par celle de votre opérateur
image: /local/netatmo/Engie.png
title: null
tap_action:
action: none
style:
top: 10%
left: 90%
width: 10%
- type: image
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity: climate.netatmo_entree
title: Up Consigne
tap_action:
action: call-service
service: Script.netatmo_increment_consigne
hold_action:
action: more-info
image: /local/netatmo/Netatmo_up.png
style:
top: 52.6%
left: 76.5%
width: 6%
- type: image
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity: climate.netatmo_entree
title: Down Consigne
tap_action:
action: call-service
service: Script.netatmo_decrement_consigne
hold_action:
action: more-info
image: /local/netatmo/Netatmo_down.png
style:
top: 52.6%
left: 56.5%
width: 6%
- type: image
entity: sensor.netatmo_hvac_action
title: Temoin Chauffe
tap_action:
action: none
image: /local/netatmo/Netatmo_chauffe.png
style:
top: 58%
left: 25.5%
width: 7%
state_filter:
heating: brightness(100%) saturate(1)
idle: opacity(0%)
- type: image
entity: sensor.netatmo_preset_mode
title: Mode de fonctionnement
style:
top: 29.9%
left: 39%
width: 11%
state_image:
manual: /local/netatmo/Netatmo_manual.png
schedule: /local/netatmo/Automatique.png
away: /local/netatmo/Absent.png
frost_guard: /local/netatmo/Hors Gel.png
tap_action:
action: none
- type: state-label
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity: climate.netatmo_entree
attribute: current_temperature
unit_of_measurement: .
title: Température Actuelle
tap_action:
action: null
style:
top: 48%
left: 25.5%
font-size: 1.6em
color: black
font-weight: 600
- type: state-label
entity: sensor.netatmo_temperature_consigne
title: Température de consigne
tap_action:
action: null
style:
top: 25%
left: 25.5%
font-size: 1em
color: white
font-weight: 600
- type: state-label
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity: climate.netatmo_entree
attribute: friendly_name
style:
top: 25%
left: 66%
font-size: 1.4em
color: black
font-weight: 400
- type: state-label
# Remplacer "sensor.thermostat_entree_battery_percent" par le sensor de votre thermostat
entity: sensor.thermostat_entree_battery_percent
title: '% Batterie'
tap_action:
action: none
style:
top: 79%
left: 8.3%
font-size: 0.7em
color: grey
font-weight: 600
- type: state-icon
# Remplacer "sensor.thermostat_entree_battery_percent" par le sensor de votre thermostat
entity: sensor.thermostat_entree_battery_percent
title: Niveau Batterie
icon: mdi:battery-high
tap_action:
action: more-info
style:
top: 86%
left: 8%
'--paper-item-icon-color': grey
- type: image
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity: climate.netatmo_entree
title: null
tap_action:
action: none
image: /local/netatmo/bouton_fond-300x98.png
style:
top: 83.2%
left: 71%
width: 58%
- type: image
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity: climate.netatmo_entree
title: Passer en Mode Absent
tap_action:
action: call-service
service: Script.netatmo_mode_absent
image: /local/netatmo/Absent.png
style:
top: 83%
left: 53%
width: 12%
- type: image
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity: climate.netatmo_entree
title: Passer en Mode Hors Gel
tap_action:
action: call-service
service: Script.netatmo_mode_hors_gel
image: /local/netatmo/Hors Gel.png
style:
top: 83.2%
left: 79.5%
width: 14.5%
- type: image
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity: climate.netatmo_entree
title: Passer en Mode Automatique
tap_action:
action: call-service
service: Script.netatmo_mode_schedule
image: /local/netatmo/Automatique.png
style:
top: 83.2%
left: 67%
width: 10%
- type: state-label
entity: select.netatmo_domicile
title: Planning
icon: mdi:calendar
style:
top: 85%
left: 27%
'--paper-item-icon-color': rgb(68,68,68)
- type: image
# Remplacer "netatmo_entree" par le nom de votre thermostat
entity: climate.netatmo_entree
title: On / Off
style:
top: 10%
left: 8%
width: 07%
state_image:
'off': /local/netatmo/netatmo-off.png
auto: /local/netatmo/netatmo-on.png
tap_action:
action: call-service
service: Script.netatmo_on_off