mirror of
https://github.com/home-assistant/frontend
synced 2024-09-22 18:30:59 +02:00
Add haptic support to light toggle button (#15569)
This commit is contained in:
parent
2e86d739fc
commit
f92deb3225
@ -23,6 +23,7 @@ import "../../../components/ha-attributes";
|
||||
import "../../../components/ha-button-menu";
|
||||
import "../../../components/ha-select";
|
||||
import { UNAVAILABLE } from "../../../data/entity";
|
||||
import { forwardHaptic } from "../../../data/haptics";
|
||||
import {
|
||||
LightColorMode,
|
||||
LightEntity,
|
||||
@ -197,6 +198,7 @@ class MoreInfoLight extends LitElement {
|
||||
|
||||
private _toggle = () => {
|
||||
const service = this.stateObj?.state === "on" ? "turn_off" : "turn_on";
|
||||
forwardHaptic("light");
|
||||
this.hass.callService("light", service, {
|
||||
entity_id: this.stateObj!.entity_id,
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user