Ankündigung

Einklappen

Serverwartung 21.2.



Am 21.2. im Laufe des späten Abends wird eine Serverwartung durchgeführt. Das Forum ist dadurch für gut zwei Stunden nicht erreichbar.
Es wird eine Wartungsseite geschaltet.

Mehr anzeigen
Weniger anzeigen

- √ - could someone please explain eval and eval_trigger?

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    - √ - could someone please explain eval and eval_trigger?

    Hello Guys..
    The eval and eval_trigger doesn't make any sense for me, i'm very confused after reading around in the doc and at this forum - seems like many different ways to do it, but i can't see the logic in it....

    All i wanna do is eval on a bool. If the bool goes high it must turn on light, if bool goes low it must turn off the light..... I'm trying this:

    Code:
            [[[floor_on_off]]]
            type=bool
            visu_acl=rw
            knx_dpt=1
            knx_listen=2/0/0
            knx_send=2/0/0
            knx_init=2/0/0
            eval = true if sh.garage.light.constant_floor else None
            eval_trigger = garage.light.constant_floor
    The eval is a bit that comes from a pushbutton to override presence sensors...

    When this one get's high it must turn on the object "Floor_on_off"

    Could someone please write the correct expression - so it can make sense for me

    #2
    Okay, finally i've found it...
    The only problem was that false must be False and true must be True....

    I'm leaving this thread - maybe other could look in it later and see.... This one works now

    Kommentar


      #3
      You are really near a solution:

      eval = true if not sh.garage.light.constant_floor() else false

      In eval you have to use sh.foo.bar() to get the value of foo.bar item.
      In eval_trigger you have to use the item foo.bar without sh.
      Umgezogen? Ja! ... Fertig? Nein!
      Baustelle 2.0 !

      Kommentar

      Lädt...
      X