ESPHome
2022.5.1
esphome
esphome
components
fan
fan_state.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/core/component.h
"
4
#include "
fan.h
"
5
6
namespace
esphome
{
7
namespace
fan {
8
9
enum
ESPDEPRECATED
(
"LegacyFanDirection members are deprecated, use FanDirection instead."
,
10
"2022.2"
) LegacyFanDirection {
11
FAN_DIRECTION_FORWARD
= 0,
12
FAN_DIRECTION_REVERSE
= 1
13
};
14
15
class
ESPDEPRECATED
("FanState is deprecated, use Fan instead.", "2022.2") FanState :
public
Fan,
public
Component
{
16
public
:
17
FanState() =
default
;
18
explicit
FanState(
const
std::string &
name
) : Fan(name) {}
19
21
FanTraits
get_traits()
override
{
return
this->traits_; }
23
void
set_traits(
const
FanTraits
&traits) { this->traits_ = traits; }
24
25
void
setup
()
override
;
26
float
get_setup_priority()
const override
;
27
28
protected
:
29
void
control(
const
FanCall
&call)
override
{ this->publish_state(); }
30
31
FanTraits
traits_{};
32
};
33
34
}
// namespace fan
35
}
// namespace esphome
setup
void setup()
esphome::shelly_dimmer::name
const char * name
Definition:
stm32flash.h:78
esphome::api::enums::FAN_DIRECTION_REVERSE
Definition:
api_pb2.h:38
esphome::Component
Definition:
component.h:66
fan.h
esphome::fan::FanCall
Definition:
fan.h:44
esphome::api::enums::FAN_DIRECTION_FORWARD
Definition:
api_pb2.h:37
esphome
Definition:
a4988.cpp:4
component.h
esphome::fan::FanTraits
Definition:
fan_traits.h:6
esphome::fan::ESPDEPRECATED
enum ESPDEPRECATED("FanSpeed is deprecated.", "2021.9") FanSpeed
Simple enum to represent the speed of a fan. - DEPRECATED - Will be deleted soon. ...
Definition:
fan.h:20
Generated by
1.8.13