6 namespace modbus_controller {
8 static const char *
const TAG =
"modbus_controller.sensor";
20 if (
val.has_value()) {
21 ESP_LOGV(TAG,
"Value overwritten by lambda");
25 ESP_LOGD(TAG,
"Sensor new state: %.02f", result);
void dump_config() override
optional< transform_func_t > transform_func_
float payload_to_float(const std::vector< uint8_t > &data, const SensorItem &item)
Convert vector<uint8_t> response payload to float.
void publish_state(float state)
Publish a new state to the front-end.
void parse_and_publish(const std::vector< uint8_t > &data) override
Implementation of SPI Controller mode.