Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Und Verknüpfung

    NEWS

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Und Verknüpfung

    This topic has been deleted. Only users with topic management privileges can see it.
    • E
      elektrofreak last edited by

      Hallo,

      ist Wahrscheinlich eine sehr simples Problem ich bekomme es aber nicht gelöst.

      Wollte gerne eine einfache UND Verknüpfung realisieren.

      "Sven.0.Switch.EinAus" UND

      "rpi2.1.gpio.19.state" =

      "rpi2.1.gpio.10.state"

      Hab es so versucht

      on({id: 'Sven.0.Switch.EinAus' && 'rpi2.1.gpio.19.state'}, function (obj) {
         setState("rpi2.1.gpio.10.state",!getState("rpi2.1.gpio.10.state").val);
      });
      
      

      Klappt leider nicht.

      Kann mir jemand Helfen

      Gruß Sven

      1 Reply Last reply Reply Quote 0
      • paul53
        paul53 last edited by

        var sven;
        var gpio19;
        
        function und() {
            if(sven && gpio19) setState("rpi2.1.gpio.10.state",!getState("rpi2.1.gpio.10.state").val);
        }
        
        on('Sven.0.Switch.EinAus', function(dp) {
            sven = dp.state.val;
            und();
        });
        on('rpi2.1.gpio.19.state', function(dp) {
            gpio19 = dp.state.val;
            und();
        });
        
        1 Reply Last reply Reply Quote 0
        • First post
          Last post

        Support us

        ioBroker
        Community Adapters
        Donate

        190
        Online

        31.7k
        Users

        79.8k
        Topics

        1.3m
        Posts

        2
        2
        1205
        Loading More Posts
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes
        Reply
        • Reply as topic
        Log in to reply
        Community
        Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
        The ioBroker Community 2014-2023
        logo