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

Store and Recall "Scene"

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

    Store and Recall "Scene"

    Hello Guys.

    I was wondering, is it possible to create a function that takes a "snapshot" of some devices, so it's possible to recall the light scene you had, etc. when leaving the house store the scenario, when coming home just restore the scene.

    Greetings

    #2
    it is surely possible. One way to do this is to create a logic which just takes one parameter: store or recall.

    If the logic should store just write a dictionary of key values of the items and their current value to a text file

    If recall just read in the text file and set the values of the items back to their old values.

    Regards,
    Bernd

    Kommentar


      #3
      That was exactly what I neded.... You have any examples on how to write to a text file? Which structure should be used?

      Kommentar

      Lädt...
      X