Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RF] Improve Home Assistant auto discoverability (#2057)
* add '-DvalueAsATopic=true' to RF based environments add '-DvalueAsATopic=true' to RF based environments. Required to support changes in zgatewayRF.ino for Home Assistant discoverability * Modify gatewayRF to improve Home Assistant auto discoverability Pass "recieved" as the type argument and 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" recieved. In order to support this, the `'-DvalueAsATopic=true'` argument must be added to all environments using the RF Library Also change getUniqueId() call to remove leading '-' which will prevent MQTT topics having '--' in them --------- Co-authored-by: James Carey <[email protected]>
- Loading branch information