-
Notifications
You must be signed in to change notification settings - Fork 0
/
automations.yaml
121 lines (121 loc) · 4.22 KB
/
automations.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
- id: '1644422834637'
alias: FURNACE - Daily Furnace Oil Set Previous Usage
description: ''
trigger:
- platform: state
entity_id: sensor.living_room_thermostat_hvac_state #SET TO THE NAME OF YOUR THERMOSTAT'S HVAC STATE SENSOR
to: heat
condition: []
action:
- service: input_number.set_value
data_template:
value: '{{ states(''sensor.furnace_time_on_today'') }}'
target:
entity_id: input_number.daily_furnace_usage_before
mode: single
- id: '1644423180288'
alias: FURNACE - Daily Furnace Oil Set Current Usage
description: ''
trigger:
- platform: state
entity_id: sensor.furnace_time_on_today
condition:
- condition: state
entity_id: sensor.living_room_thermostat_hvac_state #SET TO THE NAME OF YOUR THERMOSTAT'S HVAC STATE SENSOR
state: heat
action:
- service: input_number.set_value
data_template:
value: '{{ states(''sensor.furnace_time_on_today'') }}'
target:
entity_id: input_number.daily_furnace_usage_after
mode: queued
max: 10
- id: '1644427064038'
alias: FURNACE - Furnace was ON
description: ''
trigger:
- platform: state
entity_id: sensor.living_room_thermostat_hvac_state #SET TO THE NAME OF YOUR THERMOSTAT'S HVAC STATE SENSOR
from: heat
condition: []
action:
- service: input_number.set_value
data_template:
value: '{{ (states("input_number.furnace_fuel_level") | float) - (states("sensor.daily_furnace_usage_difference")
| float * 2.84) | round(1) }}' #CHANGE "2.84" TO THE RATING FOR YOUR FUEL PUMP; THIS IS CURRENTLY SET TO 2.84L
target:
entity_id: input_number.furnace_fuel_level
- service: input_number.set_value
data_template:
value: '{{ (states("input_number.fuel_usage_since_last_fill") | float) + (states("sensor.daily_furnace_usage_difference")
| float * 2.84) | round(1) }}' #CHANGE "2.84" TO THE RATING FOR YOUR FUEL PUMP; THIS IS CURRENTLY SET TO 2.84L
target:
entity_id: input_number.fuel_usage_since_last_fill
- service: input_number.set_value
data_template:
value: '{{ (states("input_number.fuel_usage_since_last_fill") | float) * (states("input_number.last_fill_price")
| float) | round(2) }}'
target:
entity_id: input_number.fuel_cost_since_last_fill
- service: input_number.set_value
data_template:
value: '{{ (states("input_number.furnace_fuel_level") | float / 2.84) | round(2)
}}' #CHANGE "2.84" TO THE RATING FOR YOUR FUEL PUMP; THIS IS CURRENTLY SET TO 2.84L
target:
entity_id: input_number.heating_time_left
mode: single
- id: '1644431921805'
alias: FURNACE - Set Furnace Fuel Level After Filling
description: ''
trigger:
- platform: state
entity_id: input_number.furnace_oil_last_fill_amount
condition: []
action:
- service: input_number.set_value
data_template:
value: '{{ states("input_number.furnace_fuel_level" ) }}'
target:
entity_id: input_number.furnace_oil_previous_level
- service: input_number.set_value
data_template:
value: '{{ (states("input_number.furnace_oil_previous_level") | float) + (states("input_number.furnace_oil_last_fill_amount")
| float) | round(1) }}'
target:
entity_id: input_number.furnace_fuel_after_filling
- service: input_number.set_value
data_template:
value: '{{ states("input_number.furnace_fuel_after_filling") }}'
target:
entity_id: input_number.furnace_fuel_level
- service: input_number.set_value
data_template:
value: '{{ (states("input_number.furnace_fuel_level") | float / 2.84) | round(2)
}}' #CHANGE "2.84" TO THE RATING FOR YOUR FUEL PUMP; THIS IS CURRENTLY SET TO 2.84L
target:
entity_id: input_number.heating_time_left
- service: input_number.set_value
data:
value: 0
target:
entity_id:
- input_number.fuel_cost_since_last_fill
- input_number.fuel_usage_since_last_fill
mode: single
- id: '1644470309461'
alias: FURNACE - Reset Daily Fuel Usage
description: ''
trigger:
- platform: time
at: 00:00:00
condition: []
action:
- service: input_number.set_value
data:
value: 0
target:
entity_id:
- input_number.daily_furnace_usage_before
- input_number.daily_furnace_usage_after
mode: single