NEWS
state value : needs integer instead of text
-
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 ?
-
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 ?
@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
Hey! Du scheinst an dieser Unterhaltung interessiert zu sein, hast aber noch kein Konto.
Hast du es satt, bei jedem Besuch durch die gleichen Beiträge zu scrollen? Wenn du dich für ein Konto anmeldest, kommst du immer genau dorthin zurück, wo du zuvor warst, und kannst dich über neue Antworten benachrichtigen lassen (entweder per E-Mail oder Push-Benachrichtigung). Du kannst auch Lesezeichen speichern und Beiträge positiv bewerten, um anderen Community-Mitgliedern deine Wertschätzung zu zeigen.
Mit deinem Input könnte dieser Beitrag noch besser werden 💗
Registrieren Anmelden