36 void setup()
override;
37 void dump_config()
override;
38 void update()
override;
45 void set_current_resistor(
float current_resistor) {
current_resistor_ = current_resistor; }
46 void set_voltage_divider(
float voltage_divider) {
voltage_divider_ = voltage_divider; }
This class simplifies creating components that periodically check a state.
pulse_counter::PulseCounterStorageBase & cf_store_
pulse_counter::PulseCounterStorageBase & cf1_store_
uint32_t change_mode_every_
HLW8012SensorModels sensor_model_
InternalGPIOPin * cf_pin_
float voltage_multiplier_
uint64_t cf_total_pulses_
float current_multiplier_
InternalGPIOPin * cf1_pin_
@ HLW8012_SENSOR_MODEL_BL0937
@ HLW8012_SENSOR_MODEL_CSE7759
@ HLW8012_SENSOR_MODEL_HLW8012
@ HLW8012_INITIAL_MODE_CURRENT
@ HLW8012_INITIAL_MODE_VOLTAGE
PulseCounterStorageBase * get_storage(bool hw_pcnt)