solar turnOnOffDiff allow setting decimals #107

This commit is contained in:
MichaelDvP
2021-09-15 10:54:57 +02:00
committed by GitHub
parent 0bf366ac75
commit 3b2a89d9f4

View File

@@ -530,8 +530,8 @@ bool Solar::set_wwMinTemp(const char * value, const int8_t id) {
} }
bool Solar::set_TurnoffDiff(const char * value, const int8_t id) { bool Solar::set_TurnoffDiff(const char * value, const int8_t id) {
int temperature; float temperature;
if (!Helpers::value2number(value, temperature)) { if (!Helpers::value2float(value, temperature)) {
return false; return false;
} }
if (flags() == EMSdevice::EMS_DEVICE_FLAG_SM10) { if (flags() == EMSdevice::EMS_DEVICE_FLAG_SM10) {
@@ -543,8 +543,8 @@ bool Solar::set_TurnoffDiff(const char * value, const int8_t id) {
} }
bool Solar::set_TurnonDiff(const char * value, const int8_t id) { bool Solar::set_TurnonDiff(const char * value, const int8_t id) {
int temperature; float temperature;
if (!Helpers::value2number(value, temperature)) { if (!Helpers::value2float(value, temperature)) {
return false; return false;
} }
if (flags() == EMSdevice::EMS_DEVICE_FLAG_SM10) { if (flags() == EMSdevice::EMS_DEVICE_FLAG_SM10) {