ESPHome 2025.5.0
Loading...
Searching...
No Matches
fan_state.h
Go to the documentation of this file.
1#pragma once
2
4#include "fan.h"
5
6namespace esphome {
7namespace fan {
8
9enum ESPDEPRECATED("LegacyFanDirection members are deprecated, use FanDirection instead.",
10 "2022.2") LegacyFanDirection {
11 FAN_DIRECTION_FORWARD = 0,
12 FAN_DIRECTION_REVERSE = 1
13};
14
15class ESPDEPRECATED("FanState is deprecated, use Fan instead.", "2022.2") FanState : public Fan, public Component {
16 public:
17 FanState() = default;
18
20 FanTraits get_traits() override { return this->traits_; }
22 void set_traits(const FanTraits &traits) { this->traits_ = traits; }
23
24 void setup() override;
25 float get_setup_priority() const override;
26
27 protected:
28 void control(const FanCall &call) override { this->publish_state(); }
29
30 FanTraits traits_{};
31};
32
33} // namespace fan
34} // namespace esphome
void setup()
enum ESPDEPRECATED("LegacyFanDirection members are deprecated, use FanDirection instead.", "2022.2") LegacyFanDirection
Definition fan_state.h:9
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7