Call correct "button.press" service for button entity toggle action (#11346)

This commit is contained in:
Philip Allgaier 2022-01-18 06:26:56 +01:00 committed by GitHub
parent 441f1fbcb5
commit ef39317019
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,6 +17,9 @@ export const turnOnOffEntity = (
case "cover":
service = turnOn ? "open_cover" : "close_cover";
break;
case "button":
service = "press";
break;
default:
service = turnOn ? "turn_on" : "turn_off";
}