Output action based on analog threshold

  • I’m new to webhooks and/or programming.

    Can someone help me to understand how I can have a Shelly 1PM relay output toggle it’s state based on the analog voltage measurement of a connected analog add on.

    I like to do sth simple

    Analog < 40% then output on

    Analog >= 40% then output off