ESPHome  1.15.3
Public Member Functions | Protected Member Functions | Protected Attributes
esphome::tuya::TuyaFan Class Reference

#include <tuya_fan.h>

Inheritance diagram for esphome::tuya::TuyaFan:

Public Member Functions

void setup () override
void dump_config () override
void set_speed_id (uint8_t speed_id)
void set_switch_id (uint8_t switch_id)
void set_oscillation_id (uint8_t oscillation_id)
void set_fan (fan::FanState *fan)
void set_tuya_parent (Tuya *parent)
void write_state ()
- Public Member Functions inherited from esphome::Component
virtual void loop ()
 This method will be called repeatedly. More...
virtual float get_setup_priority () const
 priority of setup(). More...
float get_actual_setup_priority () const
void set_setup_priority (float priority)
virtual float get_loop_priority () const
 priority of loop(). More...
void call ()
virtual void on_shutdown ()
virtual void on_safe_shutdown ()
uint32_t get_component_state () const
virtual void mark_failed ()
 Mark this component as failed. More...
bool is_failed ()
virtual bool can_proceed ()
bool status_has_warning ()
bool status_has_error ()
void status_set_warning ()
void status_set_error ()
void status_clear_warning ()
void status_clear_error ()
void status_momentary_warning (const std::string &name, uint32_t length=5000)
void status_momentary_error (const std::string &name, uint32_t length=5000)
bool has_overridden_loop () const

Protected Member Functions

void update_speed_ (uint32_t value)
void update_switch_ (uint32_t value)
void update_oscillation_ (uint32_t value)
- Protected Member Functions inherited from esphome::Component
virtual void call_loop ()
virtual void call_setup ()
void set_interval (const std::string &name, uint32_t interval, std::function< void()> &&f)
 Set an interval function with a unique name. More...
void set_interval (uint32_t interval, std::function< void()> &&f)
bool cancel_interval (const std::string &name)
 Cancel an interval function. More...
void set_timeout (uint32_t timeout, std::function< void()> &&f)
void set_timeout (const std::string &name, uint32_t timeout, std::function< void()> &&f)
 Set a timeout function with a unique name. More...
bool cancel_timeout (const std::string &name)
 Cancel a timeout function. More...
void defer (const std::string &name, std::function< void()> &&f)
 Defer a callback to the next loop() call. More...
void defer (std::function< void()> &&f)
 Defer a callback to the next loop() call. More...
bool cancel_defer (const std::string &name)
 Cancel a defer callback using the specified name, name must not be empty. More...

Protected Attributes

optional< uint8_t > speed_id_ {}
optional< uint8_t > switch_id_ {}
optional< uint8_t > oscillation_id_ {}
- Protected Attributes inherited from esphome::Component
uint32_t component_state_ {0x0000}
 State of this component. More...
float setup_priority_override_ {NAN}

Detailed Description

Definition at line 10 of file tuya_fan.h.

Member Function Documentation

◆ dump_config()

void esphome::tuya::TuyaFan::dump_config ( )

Reimplemented from esphome::Component.

Definition at line 47 of file tuya_fan.cpp.

◆ set_fan()

void esphome::tuya::TuyaFan::set_fan ( fan::FanState fan)

Definition at line 17 of file tuya_fan.h.

◆ set_oscillation_id()

void esphome::tuya::TuyaFan::set_oscillation_id ( uint8_t  oscillation_id)

Definition at line 16 of file tuya_fan.h.

◆ set_speed_id()

void esphome::tuya::TuyaFan::set_speed_id ( uint8_t  speed_id)

Definition at line 14 of file tuya_fan.h.

◆ set_switch_id()

void esphome::tuya::TuyaFan::set_switch_id ( uint8_t  switch_id)

Definition at line 15 of file tuya_fan.h.

◆ set_tuya_parent()

void esphome::tuya::TuyaFan::set_tuya_parent ( Tuya parent)

Definition at line 18 of file tuya_fan.h.

◆ setup()

void esphome::tuya::TuyaFan::setup ( )

Reimplemented from esphome::Component.

Definition at line 9 of file tuya_fan.cpp.

◆ update_oscillation_()

void esphome::tuya::TuyaFan::update_oscillation_ ( uint32_t  value)

◆ update_speed_()

void esphome::tuya::TuyaFan::update_speed_ ( uint32_t  value)

◆ update_switch_()

void esphome::tuya::TuyaFan::update_switch_ ( uint32_t  value)

◆ write_state()

void esphome::tuya::TuyaFan::write_state ( )

Definition at line 57 of file tuya_fan.cpp.

Field Documentation

◆ fan_

fan::FanState* esphome::tuya::TuyaFan::fan_

Definition at line 30 of file tuya_fan.h.

◆ oscillation_id_

optional<uint8_t> esphome::tuya::TuyaFan::oscillation_id_ {}

Definition at line 29 of file tuya_fan.h.

◆ parent_

Tuya* esphome::tuya::TuyaFan::parent_

Definition at line 26 of file tuya_fan.h.

◆ speed_id_

optional<uint8_t> esphome::tuya::TuyaFan::speed_id_ {}

Definition at line 27 of file tuya_fan.h.

◆ switch_id_

optional<uint8_t> esphome::tuya::TuyaFan::switch_id_ {}

Definition at line 28 of file tuya_fan.h.

The documentation for this class was generated from the following files: