mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-02-12 19:15:44 +00:00
Added HASS specific modules
This commit is contained in:
@ -1,2 +1,23 @@
|
||||
|
||||
//This will get populated in a later merge
|
||||
#include "../cJSON/cJSON.h"
|
||||
|
||||
typedef enum {
|
||||
ENTITY_RELAY = 0,
|
||||
ENTITY_LIGHT = 1
|
||||
} ENTITY_TYPE;
|
||||
|
||||
/// @brief HomeAssistant device discovery information
|
||||
typedef struct HassDeviceInfo_s{
|
||||
char *unique_id;
|
||||
char *channel;
|
||||
char *json;
|
||||
cJSON *root;
|
||||
cJSON *device;
|
||||
cJSON *ids;
|
||||
} HassDeviceInfo;
|
||||
|
||||
char *hass_build_unique_id(ENTITY_TYPE type, int index);
|
||||
char *hass_build_unique_id(ENTITY_TYPE type, int index);
|
||||
char *hass_build_discovery_json(HassDeviceInfo *info);
|
||||
HassDeviceInfo *hass_init_device_info(ENTITY_TYPE type, int index, char *payload_on, char *payload_off);
|
||||
void hass_free_device_info(HassDeviceInfo *info);
|
||||
|
||||
Reference in New Issue
Block a user