diff --git a/src/espmega_iot_homeassistant.cpp b/src/espmega_iot_homeassistant.cpp index e69de29..fe534ed 100644 --- a/src/espmega_iot_homeassistant.cpp +++ b/src/espmega_iot_homeassistant.cpp @@ -0,0 +1,24 @@ +#include +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) { + +} \ No newline at end of file diff --git a/src/espmega_iot_homeassistant.hpp b/src/espmega_iot_homeassistant.hpp index e69de29..8eb0511 100644 --- a/src/espmega_iot_homeassistant.hpp +++ b/src/espmega_iot_homeassistant.hpp @@ -0,0 +1,22 @@ +#pragma once +#include + +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; +}; \ No newline at end of file