8 #ifdef USE_BINARY_SENSOR 16 #ifdef USE_TEXT_SENSOR 44 #ifdef USE_BINARY_SENSOR 49 #ifdef USE_TEXT_SENSOR 94 void queue_command_(uint16_t command,
double volume,
int duration,
bool should_schedule);
107 #ifdef USE_BINARY_SENSOR 112 #ifdef USE_TEXT_SENSOR 123 void play(Ts...
x)
override { this->ezopmp_->find(); }
133 void play(Ts...
x)
override { this->ezopmp_->dose_continuously(); }
143 void play(Ts...
x)
override { this->ezopmp_->dose_volume(this->volume_.value(
x...)); }
144 TEMPLATABLE_VALUE(
double, volume)
155 this->ezopmp_->dose_volume_over_time(this->volume_.value(
x...), this->duration_.value(
x...));
157 TEMPLATABLE_VALUE(
double, volume)
158 TEMPLATABLE_VALUE(
int, duration)
169 this->ezopmp_->dose_with_constant_flow_rate(this->volume_.value(
x...), this->duration_.value(
x...));
171 TEMPLATABLE_VALUE(
double, volume)
172 TEMPLATABLE_VALUE(
int, duration)
182 void play(Ts...
x)
override { this->ezopmp_->set_calibration_volume(this->volume_.value(
x...)); }
183 TEMPLATABLE_VALUE(
double, volume)
193 void play(Ts...
x)
override { this->ezopmp_->clear_total_volume_dosed(); }
203 void play(Ts...
x)
override { this->ezopmp_->clear_calibration(); }
213 void play(Ts...
x)
override { this->ezopmp_->pause_dosing(); }
223 void play(Ts...
x)
override { this->ezopmp_->stop_dosing(); }
233 void play(Ts...
x)
override { this->ezopmp_->change_i2c_address(this->
address_.value(
x...)); }
234 TEMPLATABLE_VALUE(
int,
address)
244 void play(Ts...
x)
override { this->ezopmp_->exec_arbitrary_command(this->command_.value(
x...)); }
245 TEMPLATABLE_VALUE(std::string, command)
void play(Ts... x) override
const float DATA
For components that import data from directly connected sensors like DHT.
EzoPMPPauseDosingAction(EzoPMP *ezopmp)
uint16_t peek_next_command_()
void play(Ts... x) override
double next_command_volume_queue_[10]
int next_command_queue_head_
void play(Ts... x) override
sensor::Sensor * absolute_total_volume_dosed_
int next_command_duration_queue_[10]
void set_last_volume_requested(sensor::Sensor *last_volume_requested)
void set_max_flow_rate(sensor::Sensor *max_flow_rate)
uint16_t current_command_
EzoPMPFindAction(EzoPMP *ezopmp)
sensor::Sensor * last_volume_requested_
void clear_total_volume_dosed()
EzoPMPDoseVolumeOverTimeAction(EzoPMP *ezopmp)
void play(Ts... x) override
void play(Ts... x) override
void change_i2c_address(int address)
void set_dosing_mode(text_sensor::TextSensor *dosing_mode)
void clear_current_command_()
void set_total_volume_dosed(sensor::Sensor *total_volume_dosed)
text_sensor::TextSensor * dosing_mode_
binary_sensor::BinarySensor * is_paused_
EzoPMPChangeI2CAddressAction(EzoPMP *ezopmp)
This class simplifies creating components that periodically check a state.
EzoPMPDoseVolumeAction(EzoPMP *ezopmp)
EzoPMPClearCalibrationAction(EzoPMP *ezopmp)
sensor::Sensor * total_volume_dosed_
int next_command_duration_
const char * arbitrary_command_
void exec_arbitrary_command(const std::basic_string< char > &command)
float get_setup_priority() const override
text_sensor::TextSensor * calibration_status_
void play(Ts... x) override
void play(Ts... x) override
void set_is_dosing(binary_sensor::BinarySensor *is_dosing)
EzoPMPDoseContinuouslyAction(EzoPMP *ezopmp)
void queue_command_(uint16_t command, double volume, int duration, bool should_schedule)
EzoPMPArbitraryCommandAction(EzoPMP *ezopmp)
void set_pump_voltage(sensor::Sensor *pump_voltage)
void set_absolute_total_volume_dosed(sensor::Sensor *absolute_total_volume_dosed)
void play(Ts... x) override
void play(Ts... x) override
void set_is_paused(binary_sensor::BinarySensor *is_paused)
void dose_volume_over_time(double volume, int duration)
void dose_volume(double volume)
uint8_t address_
store the address of the device on the bus
void dose_with_constant_flow_rate(double volume, int duration)
sensor::Sensor * pump_voltage_
void set_calibration_volume(double volume)
void read_command_result_()
EzoPMPSetCalibrationVolumeAction(EzoPMP *ezopmp)
int next_command_queue_last_
uint16_t next_command_queue_[10]
Implementation of SPI Controller mode.
EzoPMPStopDosingAction(EzoPMP *ezopmp)
Base class for all binary_sensor-type classes.
void play(Ts... x) override
sensor::Sensor * current_volume_dosed_
binary_sensor::BinarySensor * is_dosing_
Base-class for all sensors.
void send_next_command_()
EzoPMPDoseWithConstantFlowRateAction(EzoPMP *ezopmp)
void set_calibration_status(text_sensor::TextSensor *calibration_status)
void play(Ts... x) override
void dump_config() override
This Class provides the methods to read/write bytes from/to an i2c device.
void play(Ts... x) override
int next_command_queue_length_
sensor::Sensor * max_flow_rate_
EzoPMPClearTotalVolumeDispensedAction(EzoPMP *ezopmp)
void set_current_volume_dosed(sensor::Sensor *current_volume_dosed)
double next_command_volume_