Coïncidence, je viens juste de me connecter au forum
Oui je viens de voir, j’ai retiré id la premiere ligne et j’ai enregistré avec le nom de l’alias
je vais tous les faire et voir ce que ça donne
Faut adpater les automatisations avec t’es entitées !
c’est ce que je viens de voir, mais du coup quand je fais sauvegarder, pour le nom tu me conseilles de mettre l’id c’est ça ?
Tu fait rien pour le ID, ce ID est créer quand tu sauvegarde une automatisation. Il sera present dans ton fichier automtions.yaml, mais ce voir pas dans le code YAML dans l’interface.
c’est bien ce qui me semblait sinon ça aurait été trop facile
mais du coup, est-ce que tu saurais me dire où trouver toutes ces entités car j’en ai que 3 de mon côté pour le thermostat et j’ai l’impression qu’il en a beaucoup plus ?
du coup pour la premiere automatisation, je pense que ça serait ça :
alias: HVAC - Heating Started
description: ''
trigger:
- platform: state
entity_id: climate.meteo
attribute: hvac_action
to: heating
from: 'off'
condition: []
action:
- service: logbook.log
data:
name: Nest Thermostat Heating
message: 'current: {{ state_attr("climate.meteo","current_temperature")
}}; target: {{ state_attr("climate.meteo","temperature") }}'
entity_id: climate.meteo
- service: input_datetime.set_datetime
entity_id: input_datetime.hvac_current_heat_started
data:
datetime: '{{ now().strftime("%Y-%m-%d %H:%M:%S") }}'
- service: input_number.set_value
data:
value: '{{ states("sensor.meteo_temperature")|float }}'
entity_id: input_number.hvac_current_heat_start_temp
mode: single
Déja, ta 14 template sensor a créer de ce que je vois dans son sensors.yaml. Tu aura 14 nouvelles entités.
Ta 4 automatisations a créer, adapter les entités des automatisations avec ces fameuse 14 nouvelles entités créer par template.
J’ai créé les 14 templates mais je me disais que peut-être en créant ces 14 templates il fallait déjà que je change des noms d’entités avec les miennes ?
Mais du coup je ne voyais que 3 entités chez moi c’est ça qui me « perturbe »
Je regarde dans le détail,
sensor.living_room_time_to_temp
celui-ci par exemple je ne vois pas quel sera le mien, mais en fait je pense qu’il faut d’abord que je fasse ceux qui me semblent simple et ensuite essayer de voir les plus « compliqués »
celui-ci par exemple
- name: « Nest Heating Runtime »
unique_id: nest_heat_runtime
unit_of_measurement: ‹ seconds ›
state: « {{state_attr(‹ climate.living_room ›,‹ elapsed_seconds ›)|float(0) }} »
je devrais je pense juste passer climate.living_room vers le mien en climate.meteo
Je ne sais pas du tout pourquoi le mien a ce nom là mais c’est pas très grave
Normal, ta pas changer les entités des templates sensor avec les tiennes.
exemple:
- name: "Nest Heating Runtime"
unique_id: nest_heat_runtime
unit_of_measurement: 'seconds'
state: "{{state_attr('climate.living_room','elapsed_seconds')|float(0) }}"
Faut changer climate.living_room
, par ton entité a toi.
cool, je vois que ma réflexion correspond à ce que tu me confirmes donc je vais déjà faire ça, j’ai voulu aller trop vite.
En plus c’est marrant, j’ai pris le même exemple que toi
Le premier était trop long
Je viens de créér cela pour le premier, ça te semble correct ?
name: "Living Room Time to Temp"
unique_id: living_room_time_to_temp
icon: mdi:camera-timer
unit_of_measurement: 'minutes'
state: "{{ ((state_attr('climate.meteo','temperature')|float(0) - states('sensor.meteo_temperature_temperature')|float(0)) * state_attr('sensor.meteo_time_to_temp','rate_of_change')|float(0)/60)|abs|int }}"
attributes:
message: |
{% if states('sensor.meteo_time_to_temp')|float(0) < 10 %}
IN LESS THAN 10 MIN
{% elif states('sensor.meteo_time_to_temp')|float(0) < 16 %}
IN 15 MIN
{% elif states('sensor.meteo_time_to_temp')|float(0) < 21 %}
IN 20 MIN
{% elif states('sensor.meteo_time_to_temp')|float(0) < 26 %}
IN 25 MIN
{% elif states('sensor.meteo_time_to_temp')|float(0) < 31 %}
IN 30 MIN
{% elif states('sensor.meteo_time_to_temp')|float(0) < 36 %}
IN 35 MIN
{% elif states('sensor.meteo_time_to_temp')|float(0) < 41 %}
IN 40 MIN
{% elif states('sensor.meteo_time_to_temp')|float(0) < 46 %}
IN 45 MIN
{% elif states('sensor.meteo_time_to_temp')|float(0) < 51 %}
IN 50 MIN
{% elif states('sensor.meteo_time_to_temp')|float(0) < 56 %}
IN 55 MIN
{% elif states('sensor.meteo_time_to_temp')|float(0) < 61 %}
IN 1 HR
{% elif states('sensor.meteo_time_to_temp')|float(0) < 66 %}
IN 1 HR 5 MIN
{% elif states('sensor.meteo_time_to_temp')|float(0) < 71 %}
IN 1 HR 10 MIN
{% elif states('sensor.meteo_time_to_temp')|float(0) < 76 %}
IN 1 HR 15 MIN
{% elif states('sensor.meteo_time_to_temp')|float(0) < 81 %}
IN 1 HR 20 MIN
{% elif states('sensor.meteo_time_to_temp')|float(0) < 86 %}
IN 1 HR 25 MIN
{% elif states('sensor.meteo_time_to_temp')|float(0) < 191 %}
IN 1½ HR
{% else %}
IN 2+ HR
{% endif %}
time_of_current_change_to_heating: >
{{ states('input_datetime.hvac_current_heat_started') }}
time_of_last_change_to_heating: >
{{ states('input_datetime.hvac_heat_started') }}
time_of_last_change_from_heating: >
{{ states('input_datetime.hvac_heat_ended') }}
elapsed_seconds: >
{{ as_timestamp(states('input_datetime.hvac_heat_ended')) - as_timestamp(states('input_datetime.hvac_heat_started')) }}
temp_at_last_change_to_heat: >
{{ states('input_number.hvac_heat_start_temp') }}
temp_at_last_change_from_heat: >
{{ states('input_number.hvac_heat_end_temp') }}
degrees_of_separation: >-
{{ (states('input_number.hvac_heat_end_temp')|float(0) - states('input_number.hvac_heat_start_temp')|float(0))|abs|round(1,"even",0) }}
rate_of_change: >
{% if state_attr('sensor.meteo_time_to_temp', 'degrees_of_separation')|float(0) > 0 %}
{{ state_attr('sensor.meteo_time_to_temp', 'elapsed_seconds')|float(0) / state_attr('sensor.meteo_time_to_temp', 'degrees_of_separation')|float(0) }}
{% else %}
0
{% endif %}
current_temp: >
{{ states('sensor.meteo_temperature') }}
target_temp: >
{{ state_attr('climate.meteo','temperature') }}
last_estimated_time_to_temp: >
{{ ((state_attr('sensor.meteo_time_to_temp','temp_at_last_change_from_heat')|float(0) - state_attr('sensor.meteo_time_to_temp','temp_at_last_change_to_heat')|float(0)) * state_attr('sensor.meteo_time_to_temp','rate_of_change')|float(0))|abs|timestamp_custom('%H:%M:%S', true) }}
Sinon, je me disais que l’astuce pour simplifier pourrait être cela
Non, c’est pas assez.
Va dans outils de DEV et états. montre une capture de climate.living_room avec les attributs.
Aïe, là tu m’as perdu
voilà les entités que j’ai du coup
C’est dommage, humidité reste en humidite alors que pour lui c’est humidity