Simplify binary_sensor_schema function (#4469)

This commit is contained in:
Jesse Hills
2023-02-20 10:13:40 +13:00
committed by GitHub
parent 04c12823b5
commit 5c49730cb9
5 changed files with 34 additions and 38 deletions
@@ -30,9 +30,8 @@ def check_button(obj):
CONFIG_SCHEMA = cv.All(
binary_sensor.BINARY_SENSOR_SCHEMA.extend(
binary_sensor.binary_sensor_schema(MatrixKeypadBinarySensor).extend(
{
cv.GenerateID(): cv.declare_id(MatrixKeypadBinarySensor),
cv.GenerateID(CONF_KEYPAD_ID): cv.use_id(MatrixKeypad),
cv.Optional(CONF_ROW): cv.int_,
cv.Optional(CONF_COL): cv.int_,