I create a new generic MQTT thing (works with generic HTTP Thing as well) and add custom channels.
If the channel identificator has a space, there is no warning/error. I guess it is common knowledge that the identifier cannot be space, but it is not checked. You can save and all..
When you leave the screen and then return back into the thing, the channel is gone. It did "not" save.
I mean this spot here:
Expected behavior
I expect an error telling me on_save that the channel idenfiticator cannot have spaces in there (and probably other special characters like äöß :.. )
Steps to reproduce
1.Install http or mqtt binding
2.create at thing and name it
3.go to channels
4.create new channel
enter a channel idenfiticator containing a space e.g. "bla bla"
enter all other mandatory information and save.
Press F5 and look at the channels that you just saved.
"{\"error\":{\"message\":\"UID segment \\u0027asd asd as d\\u0027 contains invalid characters. The last segment of the channel UID must match the pattern \\u0027[\\\\w-]*|[\\\\w-]*#[\\\\w-]*\\u0027.\",\"http-code\":500,\"exception\":{\"class\":\"java.lang.IllegalArgumentException\",\"message\":\"UID segment \\u0027asd asd as d\\u0027 contains invalid characters. The last segment of the channel UID must match the pattern \\u0027[\\\\w-]*|[\\\\w-]*#[\\\\w-]*\\u0027.\",\"localized-message\":\"UID segment \\u0027asd asd as d\\u0027 contains invalid characters. The last segment of the channel UID must match the pattern \\u0027[\\\\w-]*|[\\\\w-]*#[\\\\w-]*\\u0027.\"}}}"
"{\"error\":{\"message\":\"UID segment \\u0027asd asd as d\\u0027 contains invalid characters. The last segment of the channel UID must match the pattern \\u0027[\\\\w-]*|[\\\\w-]*#[\\\\w-]*\\u0027.\",\"http-code\":500,\"exception\":{\"class\":\"java.lang.IllegalArgumentException\",\"message\":\"UID segment \\u0027asd asd as d\\u0027 contains invalid characters. The last segment of the channel UID must match the pattern \\u0027[\\\\w-]*|[\\\\w-]*#[\\\\w-]*\\u0027.\",\"localized-message\":\"UID segment \\u0027asd asd as d\\u0027 contains invalid characters. The last segment of the channel UID must match the pattern \\u0027[\\\\w-]*|[\\\\w-]*#[\\\\w-]*\\u0027.\"}}}"
The problem
I create a new generic MQTT thing (works with generic HTTP Thing as well) and add custom channels. If the channel identificator has a space, there is no warning/error. I guess it is common knowledge that the identifier cannot be space, but it is not checked. You can save and all.. When you leave the screen and then return back into the thing, the channel is gone. It did "not" save.
I mean this spot here:
Expected behavior
I expect an error telling me on_save that the channel idenfiticator cannot have spaces in there (and probably other special characters like äöß :.. )
Steps to reproduce
1.Install http or mqtt binding 2.create at thing and name it 3.go to channels 4.create new channel
Your environment
Browser console
Browser network traffic
Additional information