main
Tomer27cz 2026-04-03 23:41:08 +02:00
parent 2d556d1a70
commit c57fc95415
1 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,9 @@
#include "dlms_meter_lib.h" #include "dlms_meter_lib.h"
#include "esphome/core/log.h"
#include "esphome/core/application.h"
#include "esphome/core/helpers.h"
#include <cstdio> #include <cstdio>
namespace esphome::dlms_meter_lib namespace esphome::dlms_meter_lib
@ -67,7 +71,7 @@ void DlmsMeterLibComponent::dump_config() {
void DlmsMeterLibComponent::set_decryption_key(const char *hex_key) { void DlmsMeterLibComponent::set_decryption_key(const char *hex_key) {
auto key = dlms_parser::Aes128GcmDecryptionKey::from_hex(hex_key); auto key = dlms_parser::Aes128GcmDecryptionKey::from_hex(hex_key);
if (key) { if (key) {
this->parser_.set_decryption_key(*key); this->parser_->set_decryption_key(*key);
} else { } else {
ESP_LOGE(TAG, "Invalid decryption key"); ESP_LOGE(TAG, "Invalid decryption key");
} }