Skip to content
  • Home
  • Aktuell
  • Tags
  • 0 Ungelesen 0
  • Kategorien
  • Unreplied
  • Beliebt
  • 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

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen
ioBroker Logo

Community Forum

  1. ioBroker Community Home
  2. English
  3. Off Topic
  4. state value : needs integer instead of text

NEWS

  • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?
    apollon77A
    apollon77
    48
    3
    8.2k

  • Monatsrückblick – September 2025
    BluefoxB
    Bluefox
    13
    1
    1.9k

  • Neues Video "KI im Smart Home" - ioBroker plus n8n
    BluefoxB
    Bluefox
    15
    1
    2.2k

state value : needs integer instead of text

Geplant Angeheftet Gesperrt Verschoben Off Topic
2 Beiträge 2 Kommentatoren 356 Aufrufe 2 Watching
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • C Offline
    C Offline
    ClaudeCoppens
    schrieb am zuletzt editiert von
    #1

    to read values of adapters in loxone I need to be able to read values. Loxone cannot read text, only values. E.g. with the LG-think adapter the state values are text, while the corresponding numbers are also available, but not via the state variable. So I am looking for a way to easily read those values via the rest API. Can anyone help with this ?

    M 1 Antwort Letzte Antwort
    0
    • C ClaudeCoppens

      to read values of adapters in loxone I need to be able to read values. Loxone cannot read text, only values. E.g. with the LG-think adapter the state values are text, while the corresponding numbers are also available, but not via the state variable. So I am looking for a way to easily read those values via the rest API. Can anyone help with this ?

      M Online
      M Online
      MCU
      schrieb am zuletzt editiert von
      #2

      @claudecoppens Example

      on({ id: 'lg-thinq.device.state', change: 'any' }, function (obj) {
          let numValue;
          switch (obj.state.val) {
              case 'ON':
                  numValue = 1;
                  break;
              case 'OFF':
                  numValue = 0;
                  break;
              default:
                  numValue = -1; // or any default value
          }
          setState('0_userdata.0.device.numericState', numValue); // Replace with your target state
      });
      

      REST-API (simpleApi)

      GET http://<iobroker-ip>:8087/get/0_userdata.0.device.numericState
      
      

      NUC i7 64GB mit Proxmox ---- Jarvis Infos Aktualisierungen der Doku auf Instagram verfolgen -> mcuiobroker Instagram
      Wenn Euch mein Vorschlag geholfen hat, bitte rechts "^" klicken.

      1 Antwort Letzte Antwort
      0
      Antworten
      • In einem neuen Thema antworten
      Anmelden zum Antworten
      • Älteste zuerst
      • Neuste zuerst
      • Meiste Stimmen


      Support us

      ioBroker
      Community Adapters
      Donate

      287

      Online

      32.4k

      Benutzer

      81.4k

      Themen

      1.3m

      Beiträge
      Community
      Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
      ioBroker Community 2014-2025
      logo
      • Anmelden

      • Du hast noch kein Konto? Registrieren

      • Anmelden oder registrieren, um zu suchen
      • Erster Beitrag
        Letzter Beitrag
      0
      • Home
      • Aktuell
      • Tags
      • Ungelesen 0
      • Kategorien
      • Unreplied
      • Beliebt
      • GitHub
      • Docu
      • Hilfe