Browse Source

light: channel id in terminal is not a path

pull/2552/head
Maxim Prokhorov 1 year ago
parent
commit
2918d9fe5d
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      code/espurna/light.cpp

+ 6
- 1
code/espurna/light.cpp View File

@ -2126,7 +2126,12 @@ bool _lightParsePayload(espurna::StringView payload) {
}
bool _lightTryParseChannel(espurna::StringView value, size_t& id) {
return tryParseIdPath(value, lightChannels(), id);
const auto channels = _light_channels.size();
if (std::find(value.begin(), value.end(), '/') != value.end()) {
return tryParseIdPath(value, channels, id);
}
return tryParseId(value, channels, id);
}
} // namespace


Loading…
Cancel
Save