Fix turning valve on/off (#19269)

This commit is contained in:
Bram Kragten
2024-01-04 03:27:30 +01:00
committed by GitHub
parent 4f05bd9e22
commit e427ffca5f
2 changed files with 4 additions and 0 deletions

View File

@@ -272,6 +272,7 @@ export const DOMAINS_TOGGLE = new Set([
"group",
"automation",
"humidifier",
"valve",
]);
/** Domains that have a dynamic entity image / picture. */

View File

@@ -24,6 +24,9 @@ export const turnOnOffEntity = (
case "scene":
service = "turn_on";
break;
case "valve":
service = turnOn ? "open_valve" : "close_valve";
break;
default:
service = turnOn ? "turn_on" : "turn_off";
}