Fix turning valve on/off (#19269)

This commit is contained in:
Bram Kragten 2024-01-04 03:27:30 +01:00
parent efddbfcfa0
commit 32fd8270d7
2 changed files with 4 additions and 0 deletions

View File

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

View File

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