ESPHome  2024.5.0
Public Member Functions | Protected Attributes
esphome::dfrobot_sen0395::PowerCommand Class Reference

#include <commands.h>

Inheritance diagram for esphome::dfrobot_sen0395::PowerCommand:
esphome::dfrobot_sen0395::Command

Public Member Functions

 PowerCommand (bool power_on)
 
uint8_t on_message (std::string &message) override
 
- Public Member Functions inherited from esphome::dfrobot_sen0395::Command
virtual ~Command ()=default
 
virtual uint8_t execute (DfrobotSen0395Component *parent)
 

Protected Attributes

bool power_on_
 
- Protected Attributes inherited from esphome::dfrobot_sen0395::Command
DfrobotSen0395Componentparent_ {nullptr}
 
std::string cmd_
 
bool cmd_sent_ {false}
 
int8_t retries_left_ {2}
 
uint32_t cmd_duration_ms_ {1000}
 
uint32_t timeout_ms_ {1500}
 

Detailed Description

Definition at line 40 of file commands.h.

Constructor & Destructor Documentation

◆ PowerCommand()

esphome::dfrobot_sen0395::PowerCommand::PowerCommand ( bool  power_on)
inline

Definition at line 42 of file commands.h.

Member Function Documentation

◆ on_message()

uint8_t esphome::dfrobot_sen0395::PowerCommand::on_message ( std::string &  message)
overridevirtual

Implements esphome::dfrobot_sen0395::Command.

Definition at line 87 of file commands.cpp.

Field Documentation

◆ power_on_

bool esphome::dfrobot_sen0395::PowerCommand::power_on_
protected

Definition at line 52 of file commands.h.


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