mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 23:57:06 +00:00
lint
This commit is contained in:
parent
581efad5a7
commit
93fe46509f
@ -528,7 +528,9 @@ def _async_subscribe_keypad_events(
|
||||
button_type=button_type,
|
||||
action=action,
|
||||
)
|
||||
async_dispatcher_send(f"{DOMAIN}_{config_entry_id}_button_{button_id}", data)
|
||||
async_dispatcher_send(
|
||||
hass, f"{DOMAIN}_{config_entry_id}_button_{button_id}", data
|
||||
)
|
||||
hass.bus.async_fire(LUTRON_CASETA_BUTTON_EVENT, data)
|
||||
|
||||
for button_id in keypad_buttons:
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from homeassistant.components.event import EventEntity
|
||||
from homeassistant.components.event import EventDeviceClass, EventEntity
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
@ -25,7 +25,7 @@ async def async_setup_entry(
|
||||
"""Set up Lutron pico and keypad buttons."""
|
||||
data = config_entry.runtime_data
|
||||
async_add_entities(
|
||||
LutronCasetaButtonEvent(data, config_entry.entry_id, button_device)
|
||||
LutronCasetaButtonEvent(data, button_device, config_entry.entry_id)
|
||||
for button_device in data.button_devices
|
||||
)
|
||||
|
||||
@ -33,6 +33,8 @@ async def async_setup_entry(
|
||||
class LutronCasetaButtonEvent(LutronCasetaDevice, EventEntity):
|
||||
"""Representation of a Lutron pico and keypad button event."""
|
||||
|
||||
_attr_device_class = EventDeviceClass.BUTTON
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
data: LutronCasetaData,
|
||||
|
Loading…
x
Reference in New Issue
Block a user