In a custom plugin, I have a method reading a state value for targeted device, doing some things modifying this value, and at the end updating the device state with the new value. It looks like this :
- Code: Select all
def selectZone(self, action, dev):
activeZone = dev.states[u'activeZone']
... some very interesting things ...
dev.updateStateOnServer("activeZone", value=targetZone)
It works perfectly if I launch once the selectZone action, or if I launch twice manually, but if I do an action group calling twice this action, it seems the state is updated only when the second call is finished ...
Is it normal ?