ESPHome  2022.1.1
Public Member Functions | Protected Member Functions | Protected Attributes
esphome::daly_bms::DalyBmsComponent Class Reference

#include <daly_bms.h>

Inheritance diagram for esphome::daly_bms::DalyBmsComponent:
esphome::PollingComponent esphome::uart::UARTDevice esphome::Component

Public Member Functions

 DalyBmsComponent ()=default
 
void set_voltage_sensor (sensor::Sensor *voltage_sensor)
 
void set_current_sensor (sensor::Sensor *current_sensor)
 
void set_battery_level_sensor (sensor::Sensor *battery_level_sensor)
 
void set_max_cell_voltage_sensor (sensor::Sensor *max_cell_voltage)
 
void set_max_cell_voltage_number_sensor (sensor::Sensor *max_cell_voltage_number)
 
void set_min_cell_voltage_sensor (sensor::Sensor *min_cell_voltage)
 
void set_min_cell_voltage_number_sensor (sensor::Sensor *min_cell_voltage_number)
 
void set_max_temperature_sensor (sensor::Sensor *max_temperature)
 
void set_max_temperature_probe_number_sensor (sensor::Sensor *max_temperature_probe_number)
 
void set_min_temperature_sensor (sensor::Sensor *min_temperature)
 
void set_min_temperature_probe_number_sensor (sensor::Sensor *min_temperature_probe_number)
 
void set_remaining_capacity_sensor (sensor::Sensor *remaining_capacity)
 
void set_cells_number_sensor (sensor::Sensor *cells_number)
 
void set_temperature_1_sensor (sensor::Sensor *temperature_1_sensor)
 
void set_temperature_2_sensor (sensor::Sensor *temperature_2_sensor)
 
void set_status_text_sensor (text_sensor::TextSensor *status_text_sensor)
 
void set_charging_mos_enabled_binary_sensor (binary_sensor::BinarySensor *charging_mos_enabled)
 
void set_discharging_mos_enabled_binary_sensor (binary_sensor::BinarySensor *discharging_mos_enabled)
 
void setup () override
 
void dump_config () override
 
void update () override
 
float get_setup_priority () const override
 
- Public Member Functions inherited from esphome::PollingComponent
 PollingComponent ()
 
 PollingComponent (uint32_t update_interval)
 Initialize this polling component with the given update interval in ms. More...
 
virtual void set_update_interval (uint32_t update_interval)
 Manually set the update interval in ms for this polling object. More...
 
void call_setup () override
 
virtual uint32_t get_update_interval () const
 Get the update interval in ms of this sensor. More...
 
- Public Member Functions inherited from esphome::Component
virtual void loop ()
 This method will be called repeatedly. More...
 
float get_actual_setup_priority () const
 
void set_setup_priority (float priority)
 
virtual float get_loop_priority () const
 priority of loop(). More...
 
void call ()
 
virtual void on_shutdown ()
 
virtual void on_safe_shutdown ()
 
uint32_t get_component_state () const
 
virtual void mark_failed ()
 Mark this component as failed. More...
 
bool is_failed ()
 
virtual bool can_proceed ()
 
bool status_has_warning ()
 
bool status_has_error ()
 
void status_set_warning ()
 
void status_set_error ()
 
void status_clear_warning ()
 
void status_clear_error ()
 
void status_momentary_warning (const std::string &name, uint32_t length=5000)
 
void status_momentary_error (const std::string &name, uint32_t length=5000)
 
bool has_overridden_loop () const
 
void set_component_source (const char *source)
 Set where this component was loaded from for some debug messages. More...
 
const char * get_component_source () const
 Get the integration where this component was declared as a string. More...
 
- Public Member Functions inherited from esphome::uart::UARTDevice
 UARTDevice ()=default
 
 UARTDevice (UARTComponent *parent)
 
void set_uart_parent (UARTComponent *parent)
 
void write_byte (uint8_t data)
 
void write_array (const uint8_t *data, size_t len)
 
void write_array (const std::vector< uint8_t > &data)
 
template<size_t N>
void write_array (const std::array< uint8_t, N > &data)
 
void write_str (const char *str)
 
bool read_byte (uint8_t *data)
 
bool peek_byte (uint8_t *data)
 
bool read_array (uint8_t *data, size_t len)
 
template<size_t N>
optional< std::array< uint8_t, N > > read_array ()
 
int available ()
 
void flush ()
 
int read ()
 
size_t write (uint8_t data)
 
int peek ()
 
void check_uart_settings (uint32_t baud_rate, uint8_t stop_bits=1, UARTParityOptions parity=UART_CONFIG_PARITY_NONE, uint8_t data_bits=8)
 Check that the configuration of the UART bus matches the provided values and otherwise print a warning. More...
 

Protected Member Functions

void request_data_ (uint8_t data_id)
 
void decode_data_ (std::vector< uint8_t > data)
 
- Protected Member Functions inherited from esphome::Component
virtual void call_loop ()
 
virtual void call_dump_config ()
 
void set_interval (const std::string &name, uint32_t interval, std::function< void()> &&f)
 Set an interval function with a unique name. More...
 
void set_interval (uint32_t interval, std::function< void()> &&f)
 
bool cancel_interval (const std::string &name)
 Cancel an interval function. More...
 
void set_retry (const std::string &name, uint32_t initial_wait_time, uint8_t max_attempts, std::function< RetryResult()> &&f, float backoff_increase_factor=1.0f)
 Set an retry function with a unique name. More...
 
void set_retry (uint32_t initial_wait_time, uint8_t max_attempts, std::function< RetryResult()> &&f, float backoff_increase_factor=1.0f)
 
bool cancel_retry (const std::string &name)
 Cancel a retry function. More...
 
void set_timeout (const std::string &name, uint32_t timeout, std::function< void()> &&f)
 Set a timeout function with a unique name. More...
 
void set_timeout (uint32_t timeout, std::function< void()> &&f)
 
bool cancel_timeout (const std::string &name)
 Cancel a timeout function. More...
 
void defer (const std::string &name, std::function< void()> &&f)
 Defer a callback to the next loop() call. More...
 
void defer (std::function< void()> &&f)
 Defer a callback to the next loop() call. More...
 
bool cancel_defer (const std::string &name)
 Cancel a defer callback using the specified name, name must not be empty. More...
 

Protected Attributes

sensor::Sensorvoltage_sensor_ {nullptr}
 
sensor::Sensorcurrent_sensor_ {nullptr}
 
sensor::Sensorbattery_level_sensor_ {nullptr}
 
sensor::Sensormax_cell_voltage_ {nullptr}
 
sensor::Sensormax_cell_voltage_number_ {nullptr}
 
sensor::Sensormin_cell_voltage_ {nullptr}
 
sensor::Sensormin_cell_voltage_number_ {nullptr}
 
sensor::Sensormax_temperature_ {nullptr}
 
sensor::Sensormax_temperature_probe_number_ {nullptr}
 
sensor::Sensormin_temperature_ {nullptr}
 
sensor::Sensormin_temperature_probe_number_ {nullptr}
 
sensor::Sensorremaining_capacity_ {nullptr}
 
sensor::Sensorcells_number_ {nullptr}
 
sensor::Sensortemperature_1_sensor_ {nullptr}
 
sensor::Sensortemperature_2_sensor_ {nullptr}
 
text_sensor::TextSensorstatus_text_sensor_ {nullptr}
 
binary_sensor::BinarySensorcharging_mos_enabled_ {nullptr}
 
binary_sensor::BinarySensordischarging_mos_enabled_ {nullptr}
 
- Protected Attributes inherited from esphome::PollingComponent
uint32_t update_interval_
 
- Protected Attributes inherited from esphome::Component
uint32_t component_state_ {0x0000}
 State of this component. More...
 
float setup_priority_override_ {NAN}
 
const char * component_source_ = nullptr
 
- Protected Attributes inherited from esphome::uart::UARTDevice
UARTComponentparent_ {nullptr}
 

Detailed Description

Definition at line 12 of file daly_bms.h.

Constructor & Destructor Documentation

◆ DalyBmsComponent()

esphome::daly_bms::DalyBmsComponent::DalyBmsComponent ( )
default

Member Function Documentation

◆ decode_data_()

void esphome::daly_bms::DalyBmsComponent::decode_data_ ( std::vector< uint8_t >  data)
protected

Definition at line 69 of file daly_bms.cpp.

◆ dump_config()

void esphome::daly_bms::DalyBmsComponent::dump_config ( )
overridevirtual

Reimplemented from esphome::Component.

Definition at line 23 of file daly_bms.cpp.

◆ get_setup_priority()

float esphome::daly_bms::DalyBmsComponent::get_setup_priority ( ) const
overridevirtual

Reimplemented from esphome::Component.

Definition at line 45 of file daly_bms.cpp.

◆ request_data_()

void esphome::daly_bms::DalyBmsComponent::request_data_ ( uint8_t  data_id)
protected

Definition at line 47 of file daly_bms.cpp.

◆ set_battery_level_sensor()

void esphome::daly_bms::DalyBmsComponent::set_battery_level_sensor ( sensor::Sensor battery_level_sensor)
inline

Definition at line 19 of file daly_bms.h.

◆ set_cells_number_sensor()

void esphome::daly_bms::DalyBmsComponent::set_cells_number_sensor ( sensor::Sensor cells_number)
inline

Definition at line 37 of file daly_bms.h.

◆ set_charging_mos_enabled_binary_sensor()

void esphome::daly_bms::DalyBmsComponent::set_charging_mos_enabled_binary_sensor ( binary_sensor::BinarySensor charging_mos_enabled)
inline

Definition at line 43 of file daly_bms.h.

◆ set_current_sensor()

void esphome::daly_bms::DalyBmsComponent::set_current_sensor ( sensor::Sensor current_sensor)
inline

Definition at line 18 of file daly_bms.h.

◆ set_discharging_mos_enabled_binary_sensor()

void esphome::daly_bms::DalyBmsComponent::set_discharging_mos_enabled_binary_sensor ( binary_sensor::BinarySensor discharging_mos_enabled)
inline

Definition at line 46 of file daly_bms.h.

◆ set_max_cell_voltage_number_sensor()

void esphome::daly_bms::DalyBmsComponent::set_max_cell_voltage_number_sensor ( sensor::Sensor max_cell_voltage_number)
inline

Definition at line 21 of file daly_bms.h.

◆ set_max_cell_voltage_sensor()

void esphome::daly_bms::DalyBmsComponent::set_max_cell_voltage_sensor ( sensor::Sensor max_cell_voltage)
inline

Definition at line 20 of file daly_bms.h.

◆ set_max_temperature_probe_number_sensor()

void esphome::daly_bms::DalyBmsComponent::set_max_temperature_probe_number_sensor ( sensor::Sensor max_temperature_probe_number)
inline

Definition at line 29 of file daly_bms.h.

◆ set_max_temperature_sensor()

void esphome::daly_bms::DalyBmsComponent::set_max_temperature_sensor ( sensor::Sensor max_temperature)
inline

Definition at line 28 of file daly_bms.h.

◆ set_min_cell_voltage_number_sensor()

void esphome::daly_bms::DalyBmsComponent::set_min_cell_voltage_number_sensor ( sensor::Sensor min_cell_voltage_number)
inline

Definition at line 25 of file daly_bms.h.

◆ set_min_cell_voltage_sensor()

void esphome::daly_bms::DalyBmsComponent::set_min_cell_voltage_sensor ( sensor::Sensor min_cell_voltage)
inline

Definition at line 24 of file daly_bms.h.

◆ set_min_temperature_probe_number_sensor()

void esphome::daly_bms::DalyBmsComponent::set_min_temperature_probe_number_sensor ( sensor::Sensor min_temperature_probe_number)
inline

Definition at line 33 of file daly_bms.h.

◆ set_min_temperature_sensor()

void esphome::daly_bms::DalyBmsComponent::set_min_temperature_sensor ( sensor::Sensor min_temperature)
inline

Definition at line 32 of file daly_bms.h.

◆ set_remaining_capacity_sensor()

void esphome::daly_bms::DalyBmsComponent::set_remaining_capacity_sensor ( sensor::Sensor remaining_capacity)
inline

Definition at line 36 of file daly_bms.h.

◆ set_status_text_sensor()

void esphome::daly_bms::DalyBmsComponent::set_status_text_sensor ( text_sensor::TextSensor status_text_sensor)
inline

Definition at line 41 of file daly_bms.h.

◆ set_temperature_1_sensor()

void esphome::daly_bms::DalyBmsComponent::set_temperature_1_sensor ( sensor::Sensor temperature_1_sensor)
inline

Definition at line 38 of file daly_bms.h.

◆ set_temperature_2_sensor()

void esphome::daly_bms::DalyBmsComponent::set_temperature_2_sensor ( sensor::Sensor temperature_2_sensor)
inline

Definition at line 39 of file daly_bms.h.

◆ set_voltage_sensor()

void esphome::daly_bms::DalyBmsComponent::set_voltage_sensor ( sensor::Sensor voltage_sensor)
inline

Definition at line 17 of file daly_bms.h.

◆ setup()

void esphome::daly_bms::DalyBmsComponent::setup ( )
overridevirtual

Reimplemented from esphome::Component.

Definition at line 21 of file daly_bms.cpp.

◆ update()

void esphome::daly_bms::DalyBmsComponent::update ( )
overridevirtual

Implements esphome::PollingComponent.

Definition at line 28 of file daly_bms.cpp.

Field Documentation

◆ battery_level_sensor_

sensor::Sensor* esphome::daly_bms::DalyBmsComponent::battery_level_sensor_ {nullptr}
protected

Definition at line 62 of file daly_bms.h.

◆ cells_number_

sensor::Sensor* esphome::daly_bms::DalyBmsComponent::cells_number_ {nullptr}
protected

Definition at line 72 of file daly_bms.h.

◆ charging_mos_enabled_

binary_sensor::BinarySensor* esphome::daly_bms::DalyBmsComponent::charging_mos_enabled_ {nullptr}
protected

Definition at line 78 of file daly_bms.h.

◆ current_sensor_

sensor::Sensor* esphome::daly_bms::DalyBmsComponent::current_sensor_ {nullptr}
protected

Definition at line 61 of file daly_bms.h.

◆ discharging_mos_enabled_

binary_sensor::BinarySensor* esphome::daly_bms::DalyBmsComponent::discharging_mos_enabled_ {nullptr}
protected

Definition at line 79 of file daly_bms.h.

◆ max_cell_voltage_

sensor::Sensor* esphome::daly_bms::DalyBmsComponent::max_cell_voltage_ {nullptr}
protected

Definition at line 63 of file daly_bms.h.

◆ max_cell_voltage_number_

sensor::Sensor* esphome::daly_bms::DalyBmsComponent::max_cell_voltage_number_ {nullptr}
protected

Definition at line 64 of file daly_bms.h.

◆ max_temperature_

sensor::Sensor* esphome::daly_bms::DalyBmsComponent::max_temperature_ {nullptr}
protected

Definition at line 67 of file daly_bms.h.

◆ max_temperature_probe_number_

sensor::Sensor* esphome::daly_bms::DalyBmsComponent::max_temperature_probe_number_ {nullptr}
protected

Definition at line 68 of file daly_bms.h.

◆ min_cell_voltage_

sensor::Sensor* esphome::daly_bms::DalyBmsComponent::min_cell_voltage_ {nullptr}
protected

Definition at line 65 of file daly_bms.h.

◆ min_cell_voltage_number_

sensor::Sensor* esphome::daly_bms::DalyBmsComponent::min_cell_voltage_number_ {nullptr}
protected

Definition at line 66 of file daly_bms.h.

◆ min_temperature_

sensor::Sensor* esphome::daly_bms::DalyBmsComponent::min_temperature_ {nullptr}
protected

Definition at line 69 of file daly_bms.h.

◆ min_temperature_probe_number_

sensor::Sensor* esphome::daly_bms::DalyBmsComponent::min_temperature_probe_number_ {nullptr}
protected

Definition at line 70 of file daly_bms.h.

◆ remaining_capacity_

sensor::Sensor* esphome::daly_bms::DalyBmsComponent::remaining_capacity_ {nullptr}
protected

Definition at line 71 of file daly_bms.h.

◆ status_text_sensor_

text_sensor::TextSensor* esphome::daly_bms::DalyBmsComponent::status_text_sensor_ {nullptr}
protected

Definition at line 76 of file daly_bms.h.

◆ temperature_1_sensor_

sensor::Sensor* esphome::daly_bms::DalyBmsComponent::temperature_1_sensor_ {nullptr}
protected

Definition at line 73 of file daly_bms.h.

◆ temperature_2_sensor_

sensor::Sensor* esphome::daly_bms::DalyBmsComponent::temperature_2_sensor_ {nullptr}
protected

Definition at line 74 of file daly_bms.h.

◆ voltage_sensor_

sensor::Sensor* esphome::daly_bms::DalyBmsComponent::voltage_sensor_ {nullptr}
protected

Definition at line 60 of file daly_bms.h.


The documentation for this class was generated from the following files: