use initial off binary sensor

This commit is contained in:
Samuel Sieb 2023-05-30 11:47:01 -07:00
parent dea297c8d7
commit dcd3b1fa30

View File

@ -6,7 +6,7 @@
namespace esphome {
namespace matrix_keypad {
class MatrixKeypadBinarySensor : public MatrixKeypadListener, public binary_sensor::BinarySensor {
class MatrixKeypadBinarySensor : public MatrixKeypadListener, public binary_sensor::BinarySensorInitiallyOff {
public:
MatrixKeypadBinarySensor(uint8_t key) : has_key_(true), key_(key){};
MatrixKeypadBinarySensor(const char *key) : has_key_(true), key_((uint8_t) key[0]){};