mirror of
https://github.com/esphome/esphome.git
synced 2025-11-20 00:35:44 +00:00
Allow custom register type for modbus number (#3202)
This commit is contained in:
@@ -11,9 +11,9 @@ using value_to_data_t = std::function<float>(float);
|
||||
|
||||
class ModbusNumber : public number::Number, public Component, public SensorItem {
|
||||
public:
|
||||
ModbusNumber(uint16_t start_address, uint8_t offset, uint32_t bitmask, SensorValueType value_type, int register_count,
|
||||
uint8_t skip_updates, bool force_new_range) {
|
||||
this->register_type = ModbusRegisterType::HOLDING;
|
||||
ModbusNumber(ModbusRegisterType register_type, uint16_t start_address, uint8_t offset, uint32_t bitmask,
|
||||
SensorValueType value_type, int register_count, uint8_t skip_updates, bool force_new_range) {
|
||||
this->register_type = register_type;
|
||||
this->start_address = start_address;
|
||||
this->offset = offset;
|
||||
this->bitmask = bitmask;
|
||||
|
||||
Reference in New Issue
Block a user