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

  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.4k

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

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

state value : needs integer instead of text

Scheduled Pinned Locked Moved Off Topic
2 Posts 2 Posters 368 Views 2 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
    ClaudeCoppens
    wrote on last edited by
    #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 Reply Last reply
    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
      wrote on last edited by
      #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 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      Support us

      ioBroker
      Community Adapters
      Donate

      389

      Online

      32.4k

      Users

      81.4k

      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