7 static const char *
const TAG =
"copy.fan";
bool state
The current on/off state of the fan.
bool oscillating
The current oscillation state of the fan.
FanDirection direction
The current direction of the fan.
optional< FanDirection > get_direction() const
optional< int > get_speed() const
virtual FanTraits get_traits()=0
void add_on_state_callback(std::function< void()> &&callback)
Register a callback that will be called each time the state changes.
FanCall & set_speed(int speed)
int speed
The current fan speed level.
void set_oscillation(bool oscillation)
Set whether this fan supports oscillation.
optional< bool > get_state() const
optional< bool > get_oscillating() const
FanCall & set_oscillating(bool oscillating)
void dump_config() override
void set_speed(bool speed)
Set whether this fan supports speed levels.
FanCall & set_state(bool binary_state)
FanCall & set_preset_mode(const std::string &preset_mode)
void control(const fan::FanCall &call) override
void set_supported_preset_modes(const std::set< std::string > &preset_modes)
Set the preset modes supported by the fan.
fan::FanTraits get_traits() override
void set_direction(bool direction)
Set whether this fan supports changing direction.
Implementation of SPI Controller mode.
std::string get_preset_mode() const
FanCall & set_direction(FanDirection direction)
void set_supported_speed_count(int speed_count)
Set how many speed levels this fan has.