Add Switchbot support and discovery. (#995)

* Use a task to process immediate BLE actions to prevent MQTT disconnection if the action takes too long to complete.

* Add state_on and state_off parameters to createDiscovery
This commit is contained in:
h2zero authored and GitHub committed 2022-04-30 09:16:06 -05:00
1 parent a15a1c0851
commit 8d6acbee12
7 files changed
+222 -62

No files matched your search

+1 -1
View File
@@ -88,7 +88,7 @@ extern void createDiscovery(const char* sensor_type,
int off_delay,
const char* payload_available, const char* payload_not_avalaible, bool gateway_entity, const char* command_topic,
const char* device_name, const char* device_manufacturer, const char* device_model, const char* device_mac, bool retainCmd,
const char* state_class);
const char* state_class, const char* state_off = nullptr, const char* state_on = nullptr);
/**
* @brief Create a message for Discovery Device Trigger. For HA @see https://www.home-assistant.io/integrations/device_trigger.mqtt/