ESPHome 2025.5.0
Loading...
Searching...
No Matches
fan.h File Reference

Go to the source code of this file.

Data Structures

class  esphome::fan::FanCall
 
struct  esphome::fan::FanRestoreState
 
class  esphome::fan::Fan
 

Namespaces

namespace  esphome
 Providing packet encoding functions for exchanging data with a remote host.
 
namespace  esphome::fan
 

Enumerations

enum class  esphome::fan::FanDirection { esphome::fan::FORWARD = 0 , esphome::fan::REVERSE = 1 }
 Simple enum to represent the direction of a fan. More...
 
enum class  esphome::fan::FanRestoreMode {
  esphome::fan::NO_RESTORE , esphome::fan::ALWAYS_OFF , esphome::fan::ALWAYS_ON , esphome::fan::RESTORE_DEFAULT_OFF ,
  esphome::fan::RESTORE_DEFAULT_ON , esphome::fan::RESTORE_INVERTED_DEFAULT_OFF , esphome::fan::RESTORE_INVERTED_DEFAULT_ON
}
 Restore mode of a fan. More...
 

Functions

const LogString * esphome::fan::fan_direction_to_string (FanDirection direction)
 
struct esphome::fan::FanRestoreState esphome::fan::__attribute__ ((packed))
 
FanCall to_call (Fan &fan)
 Convert this struct to a fan call that can be performed.
 
void apply (Fan &fan)
 Apply these settings to the fan.
 

Variables

bool state
 
int speed
 
bool oscillating
 
FanDirection direction
 
uint8_t preset_mode
 
esphome::fan::Fan esphome::fan::__attribute__
 

Function Documentation

◆ apply()

void __attribute__::apply ( Fan & fan)

Apply these settings to the fan.

◆ to_call()

FanCall __attribute__::to_call ( Fan & fan)

Convert this struct to a fan call that can be performed.

Variable Documentation

◆ direction

FanDirection direction

Definition at line 3 of file fan.h.

◆ oscillating

bool oscillating

Definition at line 2 of file fan.h.

◆ preset_mode

uint8_t preset_mode

Definition at line 4 of file fan.h.

◆ speed

int speed

Definition at line 1 of file fan.h.

◆ state

GateStatus state

Definition at line 0 of file fan.h.