ESPHome 2026.5.1
Loading...
Searching...
No Matches
binary_fan.h
Go to the documentation of this file.
1#pragma once
2
6
7namespace esphome::binary {
8
9class BinaryFan : public Component, public fan::Fan {
10 public:
11 void setup() override;
12 void dump_config() override;
13
14 void set_output(output::BinaryOutput *output) { this->output_ = output; }
17
18 fan::FanTraits get_traits() override;
19
20 protected:
21 void control(const fan::FanCall &call) override;
22 void write_state_();
23
27};
28
29} // namespace esphome::binary
fan::FanTraits get_traits() override
output::BinaryOutput * oscillating_
Definition binary_fan.h:25
output::BinaryOutput * output_
Definition binary_fan.h:24
void set_output(output::BinaryOutput *output)
Definition binary_fan.h:14
output::BinaryOutput * direction_
Definition binary_fan.h:26
void set_direction(output::BinaryOutput *direction)
Definition binary_fan.h:16
void control(const fan::FanCall &call) override
void dump_config() override
void set_oscillating(output::BinaryOutput *oscillating)
Definition binary_fan.h:15
FanDirection direction
The current direction of the fan.
Definition fan.h:116
bool oscillating
The current oscillation state of the fan.
Definition fan.h:112