initial structure
This commit is contained in:
parent
010c92fc17
commit
e59c00b46e
|
@ -0,0 +1,24 @@
|
|||
#include <espmega_iot_homeassistant.hpp>
|
||||
void homeassistant_setup() {
|
||||
|
||||
}
|
||||
void homeassistant_loop() {
|
||||
|
||||
}
|
||||
void homeassistant_mqtt_callback(char* topic, uint8_t topic_length, char* payload, unsigned int payload_length) {
|
||||
|
||||
}
|
||||
|
||||
char* homeassistant_get_state(char* entity_id) {
|
||||
|
||||
}
|
||||
void homeassistant_set_state(char* entity_id, char* state) {
|
||||
|
||||
}
|
||||
|
||||
char* homeassistant_get_attributes(char* entity_id, char* attribute_name) {
|
||||
|
||||
}
|
||||
void homeassistant_set_attributes(char* entity_id, char* attribute_name, char* value) {
|
||||
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
#pragma once
|
||||
#include <PubSubClient.h>
|
||||
|
||||
extern PubSubClient mqtt;
|
||||
extern bool standalone;
|
||||
extern char MQTT_BASE_TOPIC[];
|
||||
|
||||
void homeassistant_setup();
|
||||
void homeassistant_loop();
|
||||
|
||||
void homeassistant_mqtt_callback(char* topic, uint8_t topic_length, char* payload, unsigned int payload_length);
|
||||
|
||||
char* homeassistant_get_state(char* entity_id);
|
||||
void homeassistant_set_state(char* entity_id, char* state);
|
||||
|
||||
char* homeassistant_get_attributes(char* entity_id, char* attribute_name);
|
||||
void homeassistant_set_attributes(char* entity_id, char* attribute_name, char* value);
|
||||
|
||||
struct homeassistant_entity {
|
||||
char* entity_id;
|
||||
char* mqtt_topic;
|
||||
};
|
Loading…
Reference in New Issue