Add MQTT disco attributes #182

This commit is contained in:
Robert Strouse 2023-10-29 14:27:25 -07:00
parent 3c16090607
commit 46f6e6912d
5 changed files with 173 additions and 112 deletions

View file

@ -313,6 +313,8 @@ class SomfyShade : public SomfyRemote {
bool p_sunFlag(bool val);
bool p_sunny(bool val);
bool p_windy(bool val);
float p_currentPos(float pos);
float p_currentTiltPos(float pos);
uint16_t p_lastRollingCode(uint16_t code);
bool publish(const char *topic, uint8_t val, bool retain = false);
bool publish(const char *topic, int8_t val, bool retain = false);
@ -347,6 +349,12 @@ class SomfyGroup : public SomfyRemote {
void emitState(uint8_t num, const char *evt = "groupState");
void sendCommand(somfy_commands cmd);
void sendCommand(somfy_commands cmd, uint8_t repeat);
int8_t p_direction(int8_t dir);
bool publish(const char *topic, uint8_t val, bool retain = false);
bool publish(const char *topic, int8_t val, bool retain = false);
bool publish(const char *topic, uint32_t val, bool retain = false);
bool publish(const char *topic, uint16_t val, bool retain = false);
bool publish(const char *topic, bool val, bool retain = false);
};
struct transceiver_config_t {
bool printBuffer = false;