Add Config Flow to AlarmDecoder (#37998)
This commit is contained in:
parent
17efa1bda5
commit
c32f698671
14 changed files with 1169 additions and 210 deletions
|
@ -1,26 +1,29 @@
|
|||
"""Support for AlarmDecoder sensors (Shows Panel Display)."""
|
||||
import logging
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.helpers.typing import HomeAssistantType
|
||||
|
||||
from . import SIGNAL_PANEL_MESSAGE
|
||||
from .const import SIGNAL_PANEL_MESSAGE
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
"""Set up for AlarmDecoder sensor devices."""
|
||||
_LOGGER.debug("AlarmDecoderSensor: setup_platform")
|
||||
async def async_setup_entry(
|
||||
hass: HomeAssistantType, entry: ConfigEntry, async_add_entities
|
||||
):
|
||||
"""Set up for AlarmDecoder sensor."""
|
||||
|
||||
device = AlarmDecoderSensor(hass)
|
||||
|
||||
add_entities([device])
|
||||
entity = AlarmDecoderSensor()
|
||||
async_add_entities([entity])
|
||||
return True
|
||||
|
||||
|
||||
class AlarmDecoderSensor(Entity):
|
||||
"""Representation of an AlarmDecoder keypad."""
|
||||
|
||||
def __init__(self, hass):
|
||||
def __init__(self):
|
||||
"""Initialize the alarm panel."""
|
||||
self._display = ""
|
||||
self._state = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue