mirror of
https://github.com/esphome/esphome.git
synced 2024-11-26 08:55:22 +01:00
Fix NTC steinhart-hart issue (#564)
This commit is contained in:
commit
fd9a9ecc63
2 changed files with 8 additions and 1 deletions
|
@ -24,7 +24,7 @@ def validate_calibration_parameter(value):
|
||||||
return cv.Schema({
|
return cv.Schema({
|
||||||
cv.Required(CONF_TEMPERATURE): cv.float_,
|
cv.Required(CONF_TEMPERATURE): cv.float_,
|
||||||
cv.Required(CONF_VALUE): cv.float_,
|
cv.Required(CONF_VALUE): cv.float_,
|
||||||
})
|
})(value)
|
||||||
|
|
||||||
value = cv.string(value)
|
value = cv.string(value)
|
||||||
parts = value.split('->')
|
parts = value.split('->')
|
||||||
|
|
|
@ -129,6 +129,13 @@ sensor:
|
||||||
b_constant: 3950
|
b_constant: 3950
|
||||||
reference_resistance: 10k
|
reference_resistance: 10k
|
||||||
reference_temperature: 25°C
|
reference_temperature: 25°C
|
||||||
|
- platform: ntc
|
||||||
|
sensor: resist
|
||||||
|
name: NTC Sensor2
|
||||||
|
calibration:
|
||||||
|
- 10.0kOhm -> 25°C
|
||||||
|
- 27.219kOhm -> 0°C
|
||||||
|
- 14.674kOhm -> 15°C
|
||||||
- platform: tcs34725
|
- platform: tcs34725
|
||||||
red_channel:
|
red_channel:
|
||||||
name: Red Channel
|
name: Red Channel
|
||||||
|
|
Loading…
Reference in a new issue