Page 1 of 1

Generic SetPoint control?

Posted: Tuesday 30 August 2022 8:44
by Leo88
Is there a generic SetPoint control available for the Domoticz dashboard?

I use a dzvents script to control switches due to the online actual power spot price which I get from my electricity supplier.
At the moment I use the virtual thermostat Setpoint to set the limiting spot price . It works although it looks a bit odd
to have to set a temperature to 1 C when I actually set a price level to 1 SEK.
Also, I should like to set the decimal values with interval 0.1

Re: Generic SetPoint control?

Posted: Tuesday 30 August 2022 11:02
by waltervl
I do not know of a general setpoint device.
the delta of 0.5 is hardcoded in the www/js/domoticz.js see https://github.com/domoticz/domoticz/bl ... z.js#L5907

Code: Select all

function SetpointUp() {
	var curValue = parseFloat($('#setpoint_popup #popup_setpoint').val());
	curValue += 0.5;
	curValue = Math.round(curValue / 0.5) * 0.5;
	var curValueStr = curValue.toFixed(1);
	$('#setpoint_popup #popup_setpoint').val(curValueStr);
}

function SetpointDown() {
	var curValue = parseFloat($('#setpoint_popup #popup_setpoint').val());
	curValue -= 0.5;
	curValue = Math.round(curValue / 0.5) * 0.5;
	var curValueStr = curValue.toFixed(1);
	$('#setpoint_popup #popup_setpoint').val(curValueStr);
So if you change this code it can be set to 0.1
But you will have to change this code after every update.