mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 11:16:35 +00:00
Prevent service call error if preset_mode is null (#13825)
This commit is contained in:
parent
8e4bebb694
commit
182b8f809c
@ -377,6 +377,7 @@ class MoreInfoClimate extends LitElement {
|
||||
|
||||
private _handlePresetmodeChanged(ev) {
|
||||
const newVal = ev.target.value || null;
|
||||
if (newVal) {
|
||||
this._callServiceHelper(
|
||||
this.stateObj!.attributes.preset_mode,
|
||||
newVal,
|
||||
@ -384,6 +385,7 @@ class MoreInfoClimate extends LitElement {
|
||||
{ preset_mode: newVal }
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
private async _callServiceHelper(
|
||||
oldVal: unknown,
|
||||
|
Loading…
x
Reference in New Issue
Block a user