7static const char *
const TAG =
"speed.fan";
11 if (restore.has_value()) {
12 restore->apply(*
this);
24 if (
call.get_state().has_value())
26 if (
call.get_speed().has_value())
28 if (
call.get_oscillating().has_value())
30 if (
call.get_direction().has_value())
optional< bool > get_state() const
optional< bool > get_oscillating() const
optional< int > get_speed() const
optional< FanDirection > get_direction() const
std::string get_preset_mode() const
FanDirection direction
The current direction of the fan.
bool oscillating
The current oscillation state of the fan.
bool state
The current on/off state of the fan.
int speed
The current fan speed level.
optional< FanRestoreState > restore_state_()
void set_supported_preset_modes(const std::set< std::string > &preset_modes)
Set the preset modes supported by the fan.
virtual void set_state(bool state)
Enable or disable this binary output.
void set_level(float state)
Set the level of this float output, this is called from the front-end.
void control(const fan::FanCall &call) override
output::BinaryOutput * oscillating_
output::FloatOutput * output_
void dump_config() override
output::BinaryOutput * direction_
std::set< std::string > preset_modes_
Providing packet encoding functions for exchanging data with a remote host.