You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you ask about the color of device (lamp) via the API you will receive a hexadecimal string.
By accident, I updated the API with normal color names instead of hex color codes. I was happy to see that actually worked as well. The color changed.
However, if you then query the same property for the color again, you will get the string of the color name back, and not a hexadecimal value.
It could be that this is 'working as intended', but it made the API a little unpredictable, so I wanted to make sure. I've since made sure my code always (and only) sends hex values to the API, so that I will only ever receive hex values when I query it.
The text was updated successfully, but these errors were encountered:
This is really up to the adapter to handle, in the setValue()/set_value() method.
The W3C spec has support for a format member of a (string) property, which could be used to specify a regex, but we don't currently support that. I opened WebThingsIO/api#141 for that.
When you ask about the color of device (lamp) via the API you will receive a hexadecimal string.
By accident, I updated the API with normal color names instead of hex color codes. I was happy to see that actually worked as well. The color changed.
However, if you then query the same property for the color again, you will get the string of the color name back, and not a hexadecimal value.
It could be that this is 'working as intended', but it made the API a little unpredictable, so I wanted to make sure. I've since made sure my code always (and only) sends hex values to the API, so that I will only ever receive hex values when I query it.
The text was updated successfully, but these errors were encountered: