mirror of
https://github.com/home-assistant/core.git
synced 2025-11-08 18:39:30 +00:00
Add availability to command_line (#105300)
* Add availability to command_line * Add tests * freezer
This commit is contained in:
@@ -20,7 +20,10 @@ from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
from homeassistant.helpers.event import async_track_time_interval
|
||||
from homeassistant.helpers.template import Template
|
||||
from homeassistant.helpers.trigger_template_entity import ManualTriggerEntity
|
||||
from homeassistant.helpers.trigger_template_entity import (
|
||||
CONF_AVAILABILITY,
|
||||
ManualTriggerEntity,
|
||||
)
|
||||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
||||
from homeassistant.util import dt as dt_util, slugify
|
||||
|
||||
@@ -48,6 +51,7 @@ async def async_setup_platform(
|
||||
CONF_UNIQUE_ID: device_config.get(CONF_UNIQUE_ID),
|
||||
CONF_NAME: Template(device_config.get(CONF_NAME, object_id), hass),
|
||||
CONF_ICON: device_config.get(CONF_ICON),
|
||||
CONF_AVAILABILITY: device_config.get(CONF_AVAILABILITY),
|
||||
}
|
||||
|
||||
value_template: Template | None = device_config.get(CONF_VALUE_TEMPLATE)
|
||||
|
||||
Reference in New Issue
Block a user