Skip to content

Commit

Permalink
Fix turning valve on/off (#19269)
Browse files Browse the repository at this point in the history
  • Loading branch information
bramkragten committed Jan 4, 2024
1 parent efddbfc commit 32fd827
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/common/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ export const DOMAINS_TOGGLE = new Set([
"group",
"automation",
"humidifier",
"valve",
]);

/** Domains that have a dynamic entity image / picture. */
Expand Down
3 changes: 3 additions & 0 deletions src/panels/lovelace/common/entity/turn-on-off-entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
Expand Down

0 comments on commit 32fd827

Please sign in to comment.