29 traits.set_oscillation(
true);
32 traits.set_direction(
true);
33 traits.set_speed(
true);
34 traits.set_supported_speed_count(5);
37 traits.set_direction(
true);
38 traits.set_speed(
true);
39 traits.set_supported_speed_count(100);
40 traits.set_oscillation(
true);
50 if (
state.has_value())
56 if (
speed.has_value())
fan::FanTraits get_traits() override
void control(const fan::FanCall &call) override
void set_type(DemoFanType type)
optional< bool > get_oscillating() const
optional< int > get_speed() const
optional< FanDirection > get_direction() 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.