make start keys work

This commit is contained in:
Samuel Sieb
2022-11-30 21:29:02 -08:00
parent 1e2b3de7f2
commit 2fcc93130c
2 changed files with 4 additions and 0 deletions

View File

@@ -46,6 +46,8 @@ async def to_code(config):
cg.add(var.set_min_length(config[CONF_MIN_LENGTH]))
if CONF_MAX_LENGTH in config:
cg.add(var.set_max_length(config[CONF_MAX_LENGTH]))
if CONF_START_KEYS in config:
cg.add(var.set_start_keys(config[CONF_START_KEYS]))
if CONF_END_KEYS in config:
cg.add(var.set_end_keys(config[CONF_END_KEYS]))
if CONF_END_KEY_REQUIRED in config:

View File

@@ -25,6 +25,8 @@ void KeyCollector::dump_config() {
ESP_LOGCONFIG(TAG, " erase keys '%s'", this->back_keys_.c_str());
if (!this->clear_keys_.empty())
ESP_LOGCONFIG(TAG, " clear keys '%s'", this->clear_keys_.c_str());
if (!this->start_keys_.empty())
ESP_LOGCONFIG(TAG, " start keys '%s'", this->start_keys_.c_str());
if (!this->end_keys_.empty()) {
ESP_LOGCONFIG(TAG, " end keys '%s'", this->end_keys_.c_str());
ESP_LOGCONFIG(TAG, " end key is required: %s", ONOFF(this->end_key_required_));