From 77972c961bb0f9e2afd4b4cfa5f243acb3cb79d9 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Thu, 25 Mar 2021 14:15:57 +0100 Subject: [PATCH] Service control: Don't fire value changed for optional empty input (#8705) --- src/components/ha-service-control.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/ha-service-control.ts b/src/components/ha-service-control.ts index 7b2caa9e9c..0d72abc7ee 100644 --- a/src/components/ha-service-control.ts +++ b/src/components/ha-service-control.ts @@ -335,7 +335,10 @@ export class HaServiceControl extends LitElement { ev.stopPropagation(); const key = (ev.currentTarget as any).key; const value = ev.detail.value; - if (this.value?.data && this.value.data[key] === value) { + if ( + this.value?.data?.[key] === value || + (!this.value?.data?.[key] && (value === "" || value === undefined)) + ) { return; }