1technophile / OpenMQTTGateway

MQTT gateway for ESP8266 or ESP32 with bidirectional 433mhz/315mhz/868mhz, Infrared communications, BLE, Bluetooth, beacons detection, mi flora, mi jia, LYWSD02, LYWSD03MMC, Mi Scale, TPMS, BBQ thermometer compatibility & LoRa.
https://docs.openmqttgateway.com
GNU General Public License v3.0
3.62k stars 795 forks source link

Modify gatewayRF auto discoverability #2053

Closed JamiePhonic closed 2 months ago

JamiePhonic commented 2 months ago

Description:

Pass switchRF[0] as the subtype argument to announceDeviceTrigger() which will cause recieved codes to be picked up by home assistant as triggers, i.e. When setting up automations in Home Assistant, selecting a device trigger and an OMG device will allow the user to select a code picked up during the autoDiscover window as the trigger for the automation, for example "1394004" pressed

Also change getUniqueId() call to remove leading '-' which will prevent MQTT topics having '--' in them

Checklist:

JamiePhonic commented 2 months ago

Closing becasue this needs some more work. Triggers seem to be inconsistent.