generated from esphome/esphome-project-template
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* additional temperature config added * changes * Update temperature_dallas_2.yaml * Update temperature_dallas_2.yaml * Update temperature_dallas_2.yaml * Update temperature_dallas_2.yaml
- Loading branch information
1 parent
21901f4
commit da15506
Showing
2 changed files
with
130 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
substitutions: | ||
temp_address_2: '' | ||
|
||
# Calibration variables | ||
# 0C using Ice Water; 100C using Boiling Water | ||
# # Calibration Temp. 2 | ||
cal_0_temp_2: "0.0" | ||
cal_100_temp_2: "100.0" | ||
|
||
sensor: | ||
# Temperature Probe 2 | ||
- platform: dallas_temp | ||
id: temp_2 | ||
icon: mdi:thermometer-lines | ||
address: ${temp_address_2} | ||
name: "Temperature 2" | ||
state_class: "measurement" | ||
device_class: "temperature" | ||
filters: | ||
- calibrate_linear: | ||
method: least_squares | ||
datapoints: | ||
- 0.0 -> ${cal_0_2} | ||
- 100.0 -> ${cal_100_2} | ||
on_value: | ||
then: | ||
- component.update: temp_range_2 | ||
|
||
# Convert to Fahrenheit - Temp. 2 | ||
- platform: template | ||
state_class: "measurement" | ||
device_class: "temperature" | ||
id: temp_f_2 | ||
lambda: |- | ||
return id(temp_2).state * 9 / 5 + 32; | ||
# Calibration Temp. 2 at 0C | ||
- platform: template | ||
name: Calibration at 0°C - Temp. 2 | ||
id: cal_0_2_sen | ||
icon: mdi:snowflake-alert | ||
unit_of_measurement: "°C" | ||
state_class: "measurement" | ||
device_class: "temperature" | ||
entity_category: "diagnostic" | ||
lambda: |- | ||
return {${cal_0_2}}; | ||
# Calibration Temp. 2 at 100C | ||
- platform: template | ||
name: Calibration at 100°C - Temp. 2 | ||
id: cal_100_2_sen | ||
icon: mdi:water-thermometer | ||
unit_of_measurement: "°C" | ||
state_class: "measurement" | ||
device_class: "temperature" | ||
entity_category: "diagnostic" | ||
lambda: |- | ||
return {${cal_100_2}}; | ||
binary_sensor: | ||
- platform: template | ||
name: Ideal Temperature 2 | ||
id: ideal_temp_2 | ||
icon: mdi:thermometer-check | ||
lambda: |- | ||
if (id(temp_range_2).state == "OK") { | ||
return true; | ||
} else { | ||
return false; | ||
} | ||
text_sensor: | ||
# Temperature Range 2 | ||
- platform: template | ||
name: Temperature 2 Range | ||
id: temp_range_2 | ||
icon: mdi:thermometer-water | ||
update_interval: "${update_temp}" | ||
lambda: |- | ||
if(id(temp_f_2).state <= id(range_cool_2).state) { | ||
return {"Cool"}; | ||
} | ||
if(id(temp_f_2).state < id(range_warm_2).state && id(temp_f_2).state > id(range_cool_2).state) { | ||
return {"OK"}; | ||
} | ||
if(id(temp_f_2).state >= id(range_warm_2).state) { | ||
return {"Warm"}; | ||
} | ||
else { | ||
return {"Unknown"}; | ||
} | ||
number: | ||
# Temperature 2 when Cool | ||
- platform: template | ||
name: "Temp. 2 Cool" | ||
id: range_cool_2 | ||
icon: mdi:snowflake-thermometer | ||
optimistic: true | ||
mode: box | ||
min_value: 0.0 | ||
max_value: 100.0 | ||
step: 0.5 | ||
restore_value: True | ||
initial_value: ${range_cool} | ||
entity_category: "Config" | ||
device_class: "temperature" | ||
on_value: | ||
then: | ||
- component.update: temp_range_2 | ||
|
||
# Temperature 2 when Warm | ||
- platform: template | ||
name: "Temp. 2 Warm" | ||
icon: mdi:sun-thermometer | ||
id: range_warm_2 | ||
optimistic: true | ||
mode: box | ||
min_value: 0.0 | ||
max_value: 100.0 | ||
step: 0.5 | ||
restore_value: True | ||
initial_value: ${range_warm} | ||
entity_category: "Config" | ||
device_class: "temperature" | ||
on_value: | ||
then: | ||
- component.update: temp_range_2 |