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:
G Johansson 2023-08-10 12:59:23 +02:00 committed by GitHub
parent 9b74321487
commit 4531dbbe62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 65 additions and 13 deletions

View file

@ -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,
}