ESPHome  2022.11.5
Data Structures | Enumerations | Functions | Variables
esphome::tuya Namespace Reference

Data Structures

class  Tuya
 
class  TuyaBinarySensor
 
class  TuyaBitmaskDatapointUpdateTrigger
 
class  TuyaBoolDatapointUpdateTrigger
 
class  TuyaClimate
 
struct  TuyaCommand
 
class  TuyaCover
 
struct  TuyaDatapoint
 
struct  TuyaDatapointListener
 
class  TuyaDatapointUpdateTrigger
 
class  TuyaEnumDatapointUpdateTrigger
 
class  TuyaFan
 
class  TuyaIntDatapointUpdateTrigger
 
class  TuyaLight
 
class  TuyaNumber
 
class  TuyaRawDatapointUpdateTrigger
 
class  TuyaSelect
 
class  TuyaSensor
 
class  TuyaStringDatapointUpdateTrigger
 
class  TuyaSwitch
 
class  TuyaTextSensor
 
class  TuyaUIntDatapointUpdateTrigger
 

Enumerations

enum  TuyaCoverRestoreMode { COVER_NO_RESTORE, COVER_RESTORE, COVER_RESTORE_AND_CALL }
 
enum  TuyaDatapointType : uint8_t {
  TuyaDatapointType::RAW = 0x00, TuyaDatapointType::BOOLEAN = 0x01, TuyaDatapointType::INTEGER = 0x02, TuyaDatapointType::STRING = 0x03,
  TuyaDatapointType::ENUM = 0x04, TuyaDatapointType::BITMASK = 0x05
}
 
enum  TuyaCommandType : uint8_t {
  TuyaCommandType::HEARTBEAT = 0x00, TuyaCommandType::PRODUCT_QUERY = 0x01, TuyaCommandType::CONF_QUERY = 0x02, TuyaCommandType::WIFI_STATE = 0x03,
  TuyaCommandType::WIFI_RESET = 0x04, TuyaCommandType::WIFI_SELECT = 0x05, TuyaCommandType::DATAPOINT_DELIVER = 0x06, TuyaCommandType::DATAPOINT_REPORT = 0x07,
  TuyaCommandType::DATAPOINT_QUERY = 0x08, TuyaCommandType::WIFI_TEST = 0x0E, TuyaCommandType::LOCAL_TIME_QUERY = 0x1C
}
 
enum  TuyaInitState : uint8_t {
  TuyaInitState::INIT_HEARTBEAT = 0x00, TuyaInitState::INIT_PRODUCT, TuyaInitState::INIT_CONF, TuyaInitState::INIT_WIFI,
  TuyaInitState::INIT_DATAPOINT, TuyaInitState::INIT_DONE
}
 

Functions

void check_expected_datapoint (const TuyaDatapoint &dp, TuyaDatapointType expected)
 

Variables

const uint8_t COMMAND_OPEN = 0x00
 
const uint8_t COMMAND_CLOSE = 0x02
 
const uint8_t COMMAND_STOP = 0x01
 

Enumeration Type Documentation

◆ TuyaCommandType

enum esphome::tuya::TuyaCommandType : uint8_t
strong
Enumerator
HEARTBEAT 
PRODUCT_QUERY 
CONF_QUERY 
WIFI_STATE 
WIFI_RESET 
WIFI_SELECT 
DATAPOINT_DELIVER 
DATAPOINT_REPORT 
DATAPOINT_QUERY 
WIFI_TEST 
LOCAL_TIME_QUERY 

Definition at line 44 of file tuya.h.

◆ TuyaCoverRestoreMode

Enumerator
COVER_NO_RESTORE 
COVER_RESTORE 
COVER_RESTORE_AND_CALL 

Definition at line 10 of file tuya_cover.h.

◆ TuyaDatapointType

enum esphome::tuya::TuyaDatapointType : uint8_t
strong
Enumerator
RAW 
BOOLEAN 
INTEGER 
STRING 
ENUM 
BITMASK 

Definition at line 15 of file tuya.h.

◆ TuyaInitState

enum esphome::tuya::TuyaInitState : uint8_t
strong
Enumerator
INIT_HEARTBEAT 
INIT_PRODUCT 
INIT_CONF 
INIT_WIFI 
INIT_DATAPOINT 
INIT_DONE 

Definition at line 58 of file tuya.h.

Function Documentation

◆ check_expected_datapoint()

void esphome::tuya::check_expected_datapoint ( const TuyaDatapoint dp,
TuyaDatapointType  expected 
)

Definition at line 10 of file automation.cpp.

Variable Documentation

◆ COMMAND_CLOSE

const uint8_t esphome::tuya::COMMAND_CLOSE = 0x02

Definition at line 8 of file tuya_cover.cpp.

◆ COMMAND_OPEN

const uint8_t esphome::tuya::COMMAND_OPEN = 0x00

Definition at line 7 of file tuya_cover.cpp.

◆ COMMAND_STOP

const uint8_t esphome::tuya::COMMAND_STOP = 0x01

Definition at line 9 of file tuya_cover.cpp.