Refactor Rest Binary sensor with ManualTriggerEntity (#97400)
* Refactor Rest Binary sensor w/ ManualTriggerEntity * test availability * review comments * Use super * Fix config
This commit is contained in:
parent
9b74321487
commit
4531dbbe62
4 changed files with 65 additions and 13 deletions
|
@ -28,6 +28,7 @@ from homeassistant.const import (
|
|||
)
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.template_entity import (
|
||||
CONF_AVAILABILITY,
|
||||
TEMPLATE_ENTITY_BASE_SCHEMA,
|
||||
TEMPLATE_SENSOR_BASE_SCHEMA,
|
||||
)
|
||||
|
@ -82,6 +83,7 @@ BINARY_SENSOR_SCHEMA = {
|
|||
vol.Optional(CONF_DEVICE_CLASS): BINARY_SENSOR_DEVICE_CLASSES_SCHEMA,
|
||||
vol.Optional(CONF_VALUE_TEMPLATE): cv.template,
|
||||
vol.Optional(CONF_FORCE_UPDATE, default=DEFAULT_FORCE_UPDATE): cv.boolean,
|
||||
vol.Optional(CONF_AVAILABILITY): cv.template,
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue