parent
af6dac8584
commit
f931cc3d1c
8 changed files with 263 additions and 3 deletions
|
@ -36,6 +36,7 @@ from homeassistant.helpers.issue_registry import IssueSeverity, async_create_iss
|
|||
from homeassistant.helpers.template import Template
|
||||
from homeassistant.helpers.template_entity import ManualTriggerEntity
|
||||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
||||
from homeassistant.util import dt as dt_util
|
||||
|
||||
from .const import CONF_COMMAND_TIMEOUT, DEFAULT_TIMEOUT, DOMAIN, LOGGER
|
||||
from .utils import check_output_or_log
|
||||
|
@ -216,6 +217,13 @@ class CommandSensor(ManualTriggerEntity, SensorEntity):
|
|||
self._process_manual_data(value)
|
||||
self.async_write_ha_state()
|
||||
|
||||
async def async_update(self) -> None:
|
||||
"""Update the entity.
|
||||
|
||||
Only used by the generic entity update service.
|
||||
"""
|
||||
await self._update_entity_state(dt_util.now())
|
||||
|
||||
|
||||
class CommandSensorData:
|
||||
"""The class for handling the data retrieval."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue