HomeGenie Forum

Automation Program Plugins and Wizard Scripting => Help => Topic started by: KaZe on November 11, 2015, 06:20:16 PM

Title: Sensor widget paramters reset
Post by: KaZe on November 11, 2015, 06:20:16 PM
Hi!

Is that possible to reset/clear the Sensor or other widget paramaters to default? I know, the module cleanup can, but I'd like to do it from program code.
Title: Re: Sensor widget paramters reset
Post by: bkenobi on November 11, 2015, 07:20:16 PM
If you look at the sensor in configure / groups, you can edit or delete parameters. Select the dasshed box on the rigt side and it will show all parameters for that object.  You could also delete the value in the parameter from the modules.xml file, but you could get yourself in trouble if you break that xml file!
Title: Re: Sensor widget paramters reset
Post by: KaZe on November 11, 2015, 07:43:40 PM
If you look at the sensor in configure / groups, you can edit or delete parameters. Select the dasshed box on the rigt side and it will show all parameters for that object.  You could also delete the value in the parameter from the modules.xml file, but you could get yourself in trouble if you break that xml file!

Thanks, I knew this method. In my case I'd like to delete from program code. Because, I'd like rewrite the PingMeAtHome extended program, that use Sensor widget instead of Status widget. So, the sensor name is the person name, which can set by program parameter. So the name like "bkenobi" :), the parameter is Status.bkenobi. But I change the name parameter to KaZe, the old parameter Parameter.bkenobi won't delete. So each parameter of change just to accrue parameters.
Title: Re: Sensor widget paramters reset
Post by: dani on November 11, 2015, 09:35:52 PM
You can follow the source code of groupe settings node to see which function is call to delete parameters.
Title: Re: Sensor widget paramters reset
Post by: KaZe on November 11, 2015, 09:51:20 PM
If you look at the sensor in configure / groups, you can edit or delete parameters. Select the dasshed box on the rigt side and it will show all parameters for that object.  You could also delete the value in the parameter from the modules.xml file, but you could get yourself in trouble if you break that xml file!
Oh, so far I did not see, the dasshed box has a delete button. ::) That suitable for me now. Thx