Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,16 @@ class ZWaveJSLogs extends SubscribeMixin(LitElement) {
if (ev.target === undefined || this._logConfig === undefined) {
return;
}
if (this._logConfig.level === ev.target.selected) {
const selected = ev.target.selected;
if (this._logConfig.level === selected) {
return;
}
setZWaveJSLogLevel(this.hass!, this.configEntryId, ev.target.selected);
setZWaveJSLogLevel(this.hass!, this.configEntryId, selected);
this._logConfig.level = selected;
this._textarea!.value += `${this.hass.localize(
"ui.panel.config.zwave_js.logs.log_level_changed",
{ level: selected.charAt(0).toUpperCase() + selected.slice(1) }
)}\n`;
}

static get styles(): CSSResultArray {
Expand Down
3 changes: 2 additions & 1 deletion src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2661,7 +2661,8 @@
"logs": {
"title": "Z-Wave JS Logs",
"log_level": "Log Level",
"subscribed_to_logs": "Subscribed to Z-Wave JS Log Messages..."
"subscribed_to_logs": "Subscribed to Z-Wave JS Log Messages...",
"log_level_changed": "Log Level changed to: {level}"
}
}
},
Expand Down