Level regulator change value hysteresis

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
hyevnersy
Normal user
Posts: 1
Joined: 04 Feb 2019, 14:38

Level regulator change value hysteresis

#1 Post by hyevnersy » 04 Feb 2019, 14:54

Hello,

I am a new user from EASYESP.

I don't find a simple fonction to change the hysteresis value like the "setlevel" from the device level regulator.
Exist : config,task,DEVICE,setlevel,21
Dont Exist : config,task,DEVICE,sethyst,2

It seem simple to do this if the code evoluate like this for the next firmawre in : ESPEasy/src/_P021_Level.ino

case PLUGIN_SET_CONFIG:
{
String command = parseString(string, 1);
if (command == F("setlevel"))
{
String value = parseString(string, 2);
float result=0;
Calculate(value.c_str(), &result);
PCONFIG_FLOAT(0) = result;
SaveSettings();
success = true;
}

// code to add for Hysteresis
if (command == F("sethyst"))
{
String value = parseString(string, 2);
float result=0;
Calculate(value.c_str(), &result);
PCONFIG_FLOAT(1) = result;
SaveSettings();
success = true;
}
break;
}

Thanks a lot.

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests