Dsmr updates (#2157)

* add option to use check_crc

* ignore newline before ( in parsing

* add gas delivered text for raw sensor

* fix compile issue when not listing any sensor

* make gas_mbus_id configurable

* update dsmr lib for clang
This commit is contained in:
Guillermo Ruffino
2021-09-14 22:14:49 -03:00
committed by GitHub
parent 103ba4c696
commit de33cbd7e7
6 changed files with 33 additions and 10 deletions
+2 -1
View File
@@ -48,7 +48,7 @@ using MyData = ::dsmr::ParsedData<DSMR_TEXT_SENSOR_LIST(DSMR_DATA_SENSOR, DSMR_C
class Dsmr : public Component, public uart::UARTDevice {
public:
Dsmr(uart::UARTComponent *uart) : uart::UARTDevice(uart) {}
Dsmr(uart::UARTComponent *uart, bool crc_check) : uart::UARTDevice(uart), crc_check_(crc_check) {}
void loop() override;
@@ -99,6 +99,7 @@ class Dsmr : public Component, public uart::UARTDevice {
DSMR_TEXT_SENSOR_LIST(DSMR_DECLARE_TEXT_SENSOR, )
std::vector<uint8_t> decryption_key_{};
bool crc_check_;
};
} // namespace dsmr
} // namespace esphome