mirror of
https://github.com/esphome/esphome.git
synced 2024-12-03 13:34:01 +01:00
keypad binary sensors should be initially off (#7808)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
This commit is contained in:
parent
72bf0086e4
commit
4c7552eca4
@ -58,7 +58,7 @@ class BinarySensor : public EntityBase, public EntityBase_DeviceClass {
|
||||
void publish_initial_state(bool state);
|
||||
|
||||
/// The current reported state of the binary sensor.
|
||||
bool state;
|
||||
bool state{false};
|
||||
|
||||
void add_filter(Filter *filter);
|
||||
void add_filters(const std::vector<Filter *> &filters);
|
||||
|
@ -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]){};
|
||||
|
Loading…
Reference in New Issue
Block a user