ok so here is my full code in configuration.yaml now
sensor:
- platform: template
sensors:
current_temperature:
unique_id: "current_temperature"
friendly_name: "Temperature actuelle insert"
unit_of_measurement: "°C"
value_template: "{{ state_attr('climate.insert_montefiore', 'current_temperature')}}"
temperature:
unique_id: "temperature"
friendly_name: "Temperature voulue insert"
unit_of_measurement: "°C"
value_template: "{{ state_attr('climate.insert_montefiore', 'temperature')}}"
fan_mode:
unique_id: "fan_mode"
friendly_name: "Vitesse ventilateur insert"
unit_of_measurement: "state"
value_template: "{{ state_attr('climate.insert_montefiore', 'fan_mode')}}"
hvac_action:
unique_id: "stove_hvac_action"
friendly_name: "Etat insert"
unit_of_measurement: "state"
value_template: "{{ state_attr('climate.insert_montefiore', 'hvac_action')}}"
smoke_temperature:
unique_id: "smoke_temperature"
friendly_name: "Temperature Fumees insert"
unit_of_measurement: "°C"
value_template: "{{ state_attr('climate.insert_montefiore', 'smoke_temperature')}}"
human_device_status:
unique_id: "human_device_status"
friendly_name: "Statut insert"
value_template: "{{ state_attr('climate.insert_montefiore', 'human_device_status')}}"
device_status:
unique_id: "device_status"
friendly_name: "Code statut insert"
value_template: >-
{% set t = states('sensor.device_status')|int(0) %}
{% set values =
['Insert éteint', 'Démarrage', 'Préchauffe',
'Chargement pellets pour allumage', 'Allumage de la bougie', 'Allumage initial (8 minutes)',
'Finallisation allumage', 'Chauffage en cours', 'Demande extinction',
'Nettoyage final (8 minutes)', 'Attente de Standby',
'Alerte: Plus de pellet', 'Alerte: Nettoyer le brasier'] %}
{{ values[t] }}
hvac_activity:
friendly_name: "Temps de fonctionnement nest"
value_template: "{{ state_attr('climate.vestiaire_thermostat_nest', 'hvac_action') }}"
I can see the status is reported in a human readable state now :
I have two problems :
- the status is not updating in the entity card I’ve added to my dashboard. Here we can see that the stove is in this mode :
But the readable message remains “insert éteint” in the card, even if I refresh it.
Also I have another problem which must be related:
All the notifications I had created are based on triggers like that read device_status, and send notifications accordingly, an example :
alias: "Notification : Insert a pellet OFF (éteint)"
description: ""
trigger:
- platform: state
entity_id: sensor.device_status
to: "0"
action:
- service: notify.mobile_app_alf
data:
title: Insert Montefiore
message: L'insert a pellets s'est éteint. Il faut le rallumer manuellement.
- service: notify.mobile_app_cel_stelar_2
data:
message: L'insert a pellets s'est éteint. Il faut le rallumer manuellement.
title: Insert Montefiore
mode: single
If I use the UI to try to select device_status statuses, here are the two only options displayed :
So there is something going wrong there. Did I make a mistake replacing my old/existing device_status value_template content ?