(button)
| 225 | } |
| 226 | |
| 227 | _handleButtonClick(button) { |
| 228 | if (button.service) { |
| 229 | const service = button.service.split(".") |
| 230 | this.hass.callService(service[0], service[1], button.serviceData) |
| 231 | this._forwardHaptic("light") |
| 232 | } else if (button.entityId) { |
| 233 | this._showEntityMoreInfo(button.entityId) |
| 234 | } |
| 235 | } |
| 236 | |
| 237 | _forwardHaptic(hapticType) { |
| 238 | const event = new Event("haptic", { bubbles: true, cancelable: false, composed: true }) |
no test coverage detected