Parameter value in one Python plugin that is different when used more than once

Python and python framework

Moderator: leecollings

Post Reply
freekdk
Posts: 33
Joined: Monday 01 February 2021 16:33
Target OS: Linux
Domoticz version: V2025.1
Location: Netherlands
Contact:

Parameter value in one Python plugin that is different when used more than once

Post by freekdk »

I have two HomeWizard 1F kWh devices and in domoticz I have two hardware devices using the same plugin. I activated a Mode3 parameter which shows in the two lines in the Hardware window to have two different values for that parameter.

I declared that parameter under the class BasePlugin and use it in the functions with the prefix "self." So in onStart(self) it gets the value of the Mode3 parameter. I would expect that device one gets 0 as that value, because that's shown in the window with all Hardware and the other device gets the non-zero value.

It turns out that both devices use the same non-zero value.

How do I implement this the way I expect it?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest