mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-29 12:16:39 +00:00
Add log level changed message when user changes Z-Wave JS log level (#9238)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
parent
2b8033a97f
commit
1bb025ccd0
@ -118,10 +118,16 @@ class ZWaveJSLogs extends SubscribeMixin(LitElement) {
|
|||||||
if (ev.target === undefined || this._logConfig === undefined) {
|
if (ev.target === undefined || this._logConfig === undefined) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this._logConfig.level === ev.target.selected) {
|
const selected = ev.target.selected;
|
||||||
|
if (this._logConfig.level === selected) {
|
||||||
return;
|
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 {
|
static get styles(): CSSResultArray {
|
||||||
|
@ -2664,7 +2664,8 @@
|
|||||||
"logs": {
|
"logs": {
|
||||||
"title": "Z-Wave JS Logs",
|
"title": "Z-Wave JS Logs",
|
||||||
"log_level": "Log Level",
|
"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}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user