mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-26 02:36:37 +00:00
Call correct "button.press" service for button entity toggle action (#11346)
This commit is contained in:
parent
441f1fbcb5
commit
ef39317019
@ -17,6 +17,9 @@ export const turnOnOffEntity = (
|
|||||||
case "cover":
|
case "cover":
|
||||||
service = turnOn ? "open_cover" : "close_cover";
|
service = turnOn ? "open_cover" : "close_cover";
|
||||||
break;
|
break;
|
||||||
|
case "button":
|
||||||
|
service = "press";
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
service = turnOn ? "turn_on" : "turn_off";
|
service = turnOn ? "turn_on" : "turn_off";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user