forked from herveaurel/HomeAssistant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.yaml
executable file
·105 lines (88 loc) · 3.66 KB
/
template.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
- sensor:
######GAZ
- name: "Gas consumption index (m³)"
unit_of_measurement: "m³"
device_class: "gas"
state_class: "total_increasing"
state: "{{ state_attr('sensor.grdf_consommation_gaz', 'index_m3') }}"
- name: "Gas consumption index (kWh)"
unit_of_measurement: "kWh"
device_class: "energy"
state_class: "total_increasing"
state: "{{ state_attr('sensor.grdf_consommation_gaz', 'index_kWh') }}"
- name: "GRDF consommation gaz (m³)"
unit_of_measurement: "m³"
device_class: "gas"
state: "{{ state_attr('sensor.grdf_consommation_gaz', 'conso_m3') }}"
- name: gas_volume
unit_of_measurement: 'm³'
state: >
{{ state_attr('sensor.gazpar', 'daily')[0]['end_index_m3'] | float(0) }}
icon: mdi:fire
device_class: gas
state_class: total_increasing
- name: gas_energy
unit_of_measurement: 'kWh'
state: >
{{ states('sensor.gazpar') | float(0) }}
icon: mdi:fire
device_class: energy
state_class: total_increasing
- name: "gaz cout jour avec abo"
unit_of_measurement: 'EUR /kWh'
state: >
{{ (states.sensor.grdf_consommation_gaz.state|float*0.0580+0.65)|float|round(2) }}
icon: "mdi:gas-burner"
device_class: "monetary"
state_class: "total_increasing"
######ELECTRICITE
- name: "electricite conso veille"
unit_of_measurement: 'kWh'
state: >
{{ states.sensor.myenedis_09397539765420.attributes.day_1 |float| round(2)}}
icon: "mdi:flash"
device_class: "energy"
state_class: "measurement"
- name: "electricite conso kwh arrondie"
unit_of_measurement: 'kWh'
state: >
{{ states.sensor.myenedis_09397539765420.state |float| round(2)}}
icon: "mdi:flash"
device_class: "energy"
state_class: "total_increasing"
- name: "electricite cout jour avec abo"
unit_of_measurement: 'EUR /kWh'
state: >
{{ (states.sensor.myenedis_09397539765420.state|float*0.1740+0.379)|float|round(2) }}
icon: "mdi:flash"
device_class: "monetary"
state_class: "total_increasing"
- name: "electricite cout semaine avec abo"
unit_of_measurement: 'EUR'
state: >
{{ (states.sensor.myenedis_09397539765420.attributes.current_week|float*0.1740+2.84)|float|round(2) }}
icon: "mdi:flash"
device_class: "monetary"
state_class: "total_increasing"
- name: "electricite cout mois avec abo"
unit_of_measurement: 'EUR'
state: >
{{ (states.sensor.myenedis_09397539765420.attributes.current_month|float*0.1740+11.36)|float|round(2) }}
icon: "mdi:flash"
device_class: "monetary"
state_class: "total_increasing"
- name: "electricite cout annee avec abo"
unit_of_measurement: 'EUR'
state: >
{{ (states.sensor.myenedis_09397539765420.attributes.current_year|float*0.1740+136.32)|float|round(2) }}
icon: "mdi:flash"
device_class: "monetary"
state_class: "total_increasing"
######MONITEUR QUALITE AIR
- name: "moniteur qualite air temp arrondie"
unit_of_measurement: '°C'
state: >
{{ states.sensor.moniteur_qualite_air_temperature.state |float| round(2)}}
icon: "mdi:thermometer"
device_class: "temperature"
state_class: "measurement"