Page 1 of 1

Prepopulate setup defaults

Posted: Thursday 22 December 2022 18:51
by brjhaverkamp
Hi all,

Hopefully someone knows how, or can tell me this is currenrtly not doable.
I would like to set the defaults in the plugin configuration params.
For my stove, I can do a discover call on the network to get back the serial number and IP address.
These are 2 of the 3 params that need to be set in the configuration screen.
Is there a way to do the discover call first, and prepopulate the default values with those?
And if so how?

Regards,

Bert

Re: Prepopulate setup defaults

Posted: Thursday 22 December 2022 19:05
by waltervl
There is no python code run on plugin configuration so I think it is not possible. Python is only run on the moment you click on add or update.

You can also not use the parameters or make them optional and let the plugin find the stove after starting the plugin. If nothing found then I do not know what happens :)