You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bonjour , je me suis permis de modifier votre code dans template .
En effet votre code multiplier le prix *100 hors ce qui m'interresser c'était de l'avoir au centime pour pouvoir l'utiliser dans énergie et ainsi avoir une estimation du cout par rapport au prix actuel avec HC-HP
Avant modification de votre template ça afficher ceci :
Après modification avec adaptation du code pour inclure le prix au centime :
Bonjour , je me suis permis de modifier votre code dans template .
En effet votre code multiplier le prix *100 hors ce qui m'interresser c'était de l'avoir au centime pour pouvoir l'utiliser dans énergie et ainsi avoir une estimation du cout par rapport au prix actuel avec HC-HP
Avant modification de votre template ça afficher ceci :
Après modification avec adaptation du code pour inclure le prix au centime :
Partage de mon code adapté :
- unique_id: "tempo_time_prices" sensor: - name: "EDF Tempo Prix Actuel" unique_id: "current" device_class: 'monetary' unit_of_measurement: "€/kWh" icon: 'mdi:cash-check' availability: > {{ not 'unavailable' in [ states('sensor.rte_tempo_couleur_actuelle'), states('binary_sensor.rte_tempo_heures_creuses'), ] and not 'unknown' in [ states('sensor.rte_tempo_couleur_actuelle'), states('binary_sensor.rte_tempo_heures_creuses'), states('input_number.tarif_edf_tempo_bleu_hp'), states('input_number.tarif_edf_tempo_bleu_hc'), states('input_number.tarif_edf_tempo_blanc_hp'), states('input_number.tarif_edf_tempo_blanc_hc'), states('input_number.tarif_edf_tempo_rouge_hp'), states('input_number.tarif_edf_tempo_rouge_hc') ] }} state: > {%- if is_state('sensor.rte_tempo_couleur_actuelle', "Bleu") %} {%- if is_state('binary_sensor.rte_tempo_heures_creuses', 'off') %} {{ states('input_number.tarif_edf_tempo_bleu_hp') | float | round(4) }} {%- else %} {{ states('input_number.tarif_edf_tempo_bleu_hc') | float | round(4) }} {%- endif %} {%- elif is_state('sensor.rte_tempo_couleur_actuelle', "Blanc") %} {%- if is_state('binary_sensor.rte_tempo_heures_creuses', 'off') %} {{ states('input_number.tarif_edf_tempo_blanc_hp') | float | round(4) }} {%- else %} {{ states('input_number.tarif_edf_tempo_blanc_hc') | float | round(4) }} {%- endif %} {%- elif is_state('sensor.rte_tempo_couleur_actuelle', "Rouge") %} {%- if is_state('binary_sensor.rte_tempo_heures_creuses', 'off') %} {{ states('input_number.tarif_edf_tempo_rouge_hp') | float | round(4) }} {%- else %} {{ states('input_number.tarif_edf_tempo_rouge_hc') | float | round(4) }} {%- endif %} {%- else %} 0 {%- endif %} - name: "EDF Tempo Prochain Prix" unique_id: "next" device_class: 'monetary' unit_of_measurement: "c€/kWh" icon: 'mdi:cash-clock' availability: > {{ not 'unavailable' in [ states('sensor.rte_tempo_couleur_actuelle'), states('sensor.rte_tempo_prochaine_couleur'), states('binary_sensor.rte_tempo_heures_creuses'), ] and not 'unknown' in [ states('sensor.rte_tempo_couleur_actuelle'), states('sensor.rte_tempo_prochaine_couleur'), states('binary_sensor.rte_tempo_heures_creuses'), states('input_number.tarif_edf_tempo_bleu_hp'), states('input_number.tarif_edf_tempo_bleu_hc'), states('input_number.tarif_edf_tempo_blanc_hp'), states('input_number.tarif_edf_tempo_blanc_hc'), states('input_number.tarif_edf_tempo_rouge_hp'), states('input_number.tarif_edf_tempo_rouge_hc') ] }} state: > {%- if is_state('sensor.rte_tempo_prochaine_couleur', "Bleu") %} {%- if is_state('binary_sensor.rte_tempo_heures_creuses', 'on') %} {{ states('input_number.tarif_edf_tempo_bleu_hp') | float | round(4) }} {%- else %} {{ states('input_number.tarif_edf_tempo_bleu_hc') | float | round(4) }} {%- endif %} {%- elif is_state('sensor.rte_tempo_prochaine_couleur', "Blanc") %} {%- if is_state('binary_sensor.rte_tempo_heures_creuses', 'on') %} {{ states('input_number.tarif_edf_tempo_blanc_hp') | float | round(4) }} {%- else %} {{ states('input_number.tarif_edf_tempo_blanc_hc') | float | round(4) }} {%- endif %} {%- elif is_state('sensor.rte_tempo_prochaine_couleur', "Rouge") %} {%- if is_state('binary_sensor.rte_tempo_heures_creuses', 'on') %} {{ states('input_number.tarif_edf_tempo_rouge_hp') | float | round(4) }} {%- else %} {{ states('input_number.tarif_edf_tempo_rouge_hc') | float | round(4) }} {%- endif %} {%- else %} 0 {%- endif %}
LA template si besoin
templates.txt
The text was updated successfully, but these errors were encountered: