How do I place conditional statements in DIa .yml script

I want to put a conditional statement in the Dia .yml. For example, if /Channel1=true then /Channel2=False

Can anyone explain this to me please.


I’m not sure how to do this.
I think there is a way to control the channels in DIA in Digi ESP, but not sure. You may need to check with Digi people.

You might need to explain what you need a bit more. The example that you give above could be solved with the ‘transforms’ device. If you make a channel that has an expression like:


  • Channel1
    expr: not c[0]

For your channel2, then it will always be the inverse of Channel1. However, that’s not necessarily conditional.

Transforms may still be an answer for you, if your gateway is new enough. Python added conditional expressions is 2.5, so gateways like the ConnectPort X2e or Transport products will allow you to use those as well.