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
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