Skip to content

Commit

Permalink
Add support for event entities in ectoplasms (#293)
Browse files Browse the repository at this point in the history
  • Loading branch information
frenck authored Aug 10, 2023
1 parent bca938c commit 01c123c
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions custom_components/spook/event.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
"""Spook - Not your homie."""
from __future__ import annotations

from typing import TYPE_CHECKING

from homeassistant.const import Platform

from .util import async_forward_platform_entry_setups_to_ectoplasm

if TYPE_CHECKING:
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback


async def async_setup_entry(
hass: HomeAssistant,
entry: ConfigEntry,
async_add_entities: AddEntitiesCallback,
) -> None:
"""Set up Spook events."""
await async_forward_platform_entry_setups_to_ectoplasm(
hass,
entry,
async_add_entities,
Platform.EVENT,
)

0 comments on commit 01c123c

Please sign in to comment.