mirror of
https://github.com/home-assistant/core.git
synced 2026-12-02 11:33:11 -04:00
Use the action field enums in keba (#195813)
This commit is contained in:
@@ -2,7 +2,10 @@
|
||||
|
||||
from typing import Any, override
|
||||
|
||||
from homeassistant.components.notify import ATTR_DATA, BaseNotificationService
|
||||
from homeassistant.components.notify import (
|
||||
BaseNotificationService,
|
||||
NotifyServiceArgument,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
||||
|
||||
@@ -32,7 +35,7 @@ class KebaNotificationService(BaseNotificationService):
|
||||
"""Send the message."""
|
||||
text = message.replace(" ", "$") # Will be translated back by the display
|
||||
|
||||
data = kwargs[ATTR_DATA] or {}
|
||||
data = kwargs[NotifyServiceArgument.DATA] or {}
|
||||
min_time = float(data.get("min_time", 2))
|
||||
max_time = float(data.get("max_time", 10))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user