creating setpoint device
Posted: Saturday 11 January 2025 15:06
Hi,
I'm (trying to) create a setpoint device from a plugin. Works fine, except the ValueMin does not get created correctly:
So the commented line gives the outcome of the formula's in my setup. However, regardless of what I enter, the created setpoint device always has the default value of -200 as minimum. This a bug?
I'm (trying to) create a setpoint device from a plugin. Works fine, except the ValueMin does not get created correctly:
Code: Select all
Options = {'ValueStep':'100', ' ValueMin':str(-1 * self.maxPower * len(self.devices_dict)), 'ValueMax':str(self.maxPower * len(self.devices_dict)), 'ValueUnit':'W'}
#Options = {'ValueStep':'100', ' ValueMin':'-4400', 'ValueMax':'4400', 'ValueUnit':'W'}
logging.debug("options to create power setpoint: "+ str(Options))
Domoticz.Unit(Name=deviceId + ' - Battery power setpoint', Unit=self.batPowerSetpointUnit, Type=242, Subtype=1, Options=Options, DeviceID=deviceId).Create()