mirror of
https://github.com/danieldemus/openhab-core.git
synced 2026-07-29 12:34:22 +02:00
core.items.GenericItem.getCommandOptions() - simplify (#5583)
This commit is contained in:
@@ -580,10 +580,7 @@ public abstract class GenericItem implements ActiveItem {
|
||||
|
||||
protected @Nullable CommandDescription getCommandOptions(@Nullable Locale locale) {
|
||||
if (commandDescriptionService instanceof CommandDescriptionService service) {
|
||||
CommandDescription commandDescription = service.getCommandDescription(this.name, locale);
|
||||
if (commandDescription != null) {
|
||||
return commandDescription;
|
||||
}
|
||||
return service.getCommandDescription(this.name, locale);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user