Page 1 of 1

creating setpoint device

Posted: Saturday 11 January 2025 15:06
by JanJaap
Hi,

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()

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?
Schermafbeelding 2025-01-11 150246.png
Schermafbeelding 2025-01-11 150246.png (30.32 KiB) Viewed 2069 times

Re: creating setpoint device

Posted: Saturday 11 January 2025 16:45
by waltervl
Do you see this behavior on classic plugin framework or the new DomoticzEx?

If on the new framework make a simple demo plugin and create a GitHub issue so a developer can reproduce and hopefully fix the issue...

Re: creating setpoint device

Posted: Saturday 11 January 2025 17:18
by JanJaap
Sorry forgot to mention. Yes it's on the Ex framework. Will make bug. Tnx

Re: creating setpoint device

Posted: Wednesday 22 January 2025 16:06
by waltervl