MCPcopy Create free account
hub / github.com/custom-cards/button-entity-row / _handleButtonClick

Method _handleButtonClick

button-entity-row.js:227–235  ·  view source on GitHub ↗
(button)

Source from the content-addressed store, hash-verified

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 })

Callers 1

renderMethod · 0.95

Calls 2

_forwardHapticMethod · 0.95
_showEntityMoreInfoMethod · 0.95

Tested by

no test coverage detected