mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
debug
This commit is contained in:
parent
0c2a0118e2
commit
2208262ca5
@ -528,9 +528,9 @@ def _async_subscribe_keypad_events(
|
||||
button_type=button_type,
|
||||
action=action,
|
||||
)
|
||||
async_dispatcher_send(
|
||||
hass, f"{DOMAIN}_{config_entry_id}_button_{button_id}", data
|
||||
)
|
||||
signal = f"{DOMAIN}_{config_entry_id}_button_{button_id}"
|
||||
_LOGGER.warning("Sending signal: %s - %s", signal, data)
|
||||
async_dispatcher_send(hass, signal, data)
|
||||
hass.bus.async_fire(LUTRON_CASETA_BUTTON_EVENT, data)
|
||||
|
||||
for button_id in keypad_buttons:
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
|
||||
from pylutron_caseta import BUTTON_STATUS_PRESSED, BUTTON_STATUS_RELEASED
|
||||
|
||||
from homeassistant.components.event import EventDeviceClass, EventEntity
|
||||
@ -18,6 +20,8 @@ from .models import (
|
||||
LutronCasetaData,
|
||||
)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_entry(
|
||||
hass: HomeAssistant,
|
||||
@ -67,6 +71,10 @@ class LutronCasetaButtonEvent(LutronCasetaDevice, EventEntity):
|
||||
|
||||
async def async_added_to_hass(self) -> None:
|
||||
"""Subscribe to button events."""
|
||||
_LOGGER.warning(
|
||||
"Subscribing to button %s",
|
||||
f"{DOMAIN}_{self._entry_id}_button_{self._button_id}",
|
||||
)
|
||||
self.async_on_remove(
|
||||
async_dispatcher_connect(
|
||||
self.hass,
|
||||
|
Loading…
x
Reference in New Issue
Block a user