Skip to content
  • Home
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. JavaScript
  5. Nachtlicht Helligkeit Uhrzeit prüfen.

NEWS

  • Neuer ioBroker-Blog online: Monatsrückblick März/April 2026
    BluefoxB
    Bluefox
    6
    1
    229

  • Verwendung von KI bitte immer deutlich kennzeichnen
    HomoranH
    Homoran
    8
    1
    222

  • Monatsrückblick Januar/Februar 2026 ist online!
    BluefoxB
    Bluefox
    18
    1
    896

Nachtlicht Helligkeit Uhrzeit prüfen.

Scheduled Pinned Locked Moved JavaScript
2 Posts 2 Posters 205 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    CyberMicha
    wrote on last edited by CyberMicha
    #1

    Hallo zusammen,
    ich stehe gerade auf dem Schlauch um auf die aktuelle Uhrzeit zu prüfen.

    Ich habe aktuell für meine Küche ein Skript, welches bei Bewegung die Lampen an bzw nach x Minuten wieder aus macht.
    Nun wollte ich es erweitern, dass ich bei Aktivierung prüfe wie spät es gerade ist und dann entsprechend die Helligkeit setzen.

    Pseudocode:
    Wenn zwischen 01:00 und 06:00 schalte das Licht mit 50% an,
    sonst mit 100%.

    UncleSamU 1 Reply Last reply
    0
    • C CyberMicha

      Hallo zusammen,
      ich stehe gerade auf dem Schlauch um auf die aktuelle Uhrzeit zu prüfen.

      Ich habe aktuell für meine Küche ein Skript, welches bei Bewegung die Lampen an bzw nach x Minuten wieder aus macht.
      Nun wollte ich es erweitern, dass ich bei Aktivierung prüfe wie spät es gerade ist und dann entsprechend die Helligkeit setzen.

      Pseudocode:
      Wenn zwischen 01:00 und 06:00 schalte das Licht mit 50% an,
      sonst mit 100%.

      UncleSamU Offline
      UncleSamU Offline
      UncleSam
      Developer
      wrote on last edited by UncleSam
      #2

      @CyberMicha Wenn es dir genau um die Stunden geht, ist das einfachste:

      let hour = new Date().getHours();
      if (hour >= 1 && hour < 6) {
      ...
      }
      

      Bitte bei Problemen mit meinen Adaptern, Issue auf GitHub erfassen: Loxone | I2C | Luxtronik2
      ♡-lichen Dank an meine Sponsoren

      1 Reply Last reply
      0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      Support us

      ioBroker
      Community Adapters
      Donate

      621

      Online

      32.8k

      Users

      82.8k

      Topics

      1.3m

      Posts
      Community
      Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
      ioBroker Community 2014-2025
      logo
      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Home
      • Recent
      • Tags
      • Unread 0
      • Categories
      • Unreplied
      • Popular
      • GitHub
      • Docu
      • Hilfe