ESPHome  2024.11.1
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  TuyaColorType { RGB, HSV, RGBHSV }
 
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_ASYNC = 0x07,
  TuyaCommandType::DATAPOINT_QUERY = 0x08, TuyaCommandType::WIFI_TEST = 0x0E, TuyaCommandType::LOCAL_TIME_QUERY = 0x1C, TuyaCommandType::DATAPOINT_REPORT_SYNC = 0x22,
  TuyaCommandType::DATAPOINT_REPORT_ACK = 0x23, TuyaCommandType::WIFI_RSSI = 0x24, TuyaCommandType::VACUUM_MAP_UPLOAD = 0x28, TuyaCommandType::GET_NETWORK_STATUS = 0x2B,
  TuyaCommandType::EXTENDED_SERVICES = 0x34
}
 
enum  TuyaExtendedServicesCommandType : uint8_t { TuyaExtendedServicesCommandType::RESET_NOTIFICATION = 0x04, TuyaExtendedServicesCommandType::MODULE_RESET = 0x05, TuyaExtendedServicesCommandType::UPDATE_IN_PROGRESS = 0x0A }
 
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

◆ TuyaColorType

Enumerator
RGB 
HSV 
RGBHSV 

Definition at line 10 of file tuya_light.h.

◆ TuyaCommandType

enum esphome::tuya::TuyaCommandType : uint8_t
strong
Enumerator
HEARTBEAT 
PRODUCT_QUERY 
CONF_QUERY 
WIFI_STATE 
WIFI_RESET 
WIFI_SELECT 
DATAPOINT_DELIVER 
DATAPOINT_REPORT_ASYNC 
DATAPOINT_QUERY 
WIFI_TEST 
LOCAL_TIME_QUERY 
DATAPOINT_REPORT_SYNC 
DATAPOINT_REPORT_ACK 
WIFI_RSSI 
VACUUM_MAP_UPLOAD 
GET_NETWORK_STATUS 
EXTENDED_SERVICES 

Definition at line 48 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 19 of file tuya.h.

◆ TuyaExtendedServicesCommandType

Enumerator
RESET_NOTIFICATION 
MODULE_RESET 
UPDATE_IN_PROGRESS 

Definition at line 68 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 74 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.