12#define LOG_BINARY_OUTPUT(this) \
13 if (this->inverted_) { \
14 ESP_LOGCONFIG(TAG, " Inverted: YES"); \
22#ifdef USE_POWER_SUPPLY
43#ifdef USE_POWER_SUPPLY
51#ifdef USE_POWER_SUPPLY
66#ifdef USE_POWER_SUPPLY
virtual void write_state(bool state)=0
power_supply::PowerSupplyRequester power_
void set_power_supply(power_supply::PowerSupply *power_supply)
Use this to connect up a power supply to this output.
virtual void set_state(bool state)
Enable or disable this binary output.
virtual void turn_off()
Disable this binary output.
virtual void turn_on()
Enable this binary output.
void set_inverted(bool inverted)
Set the inversion state of this binary output.
bool is_inverted() const
Return whether this binary output is inverted.
void set_parent(PowerSupply *parent)