Add support for MQTT device triggers (#31679)

* Add support for MQTT device triggers

* Fix test, tweaks

* Improve test coverage

* Address review comments, improve tests

* Tidy up exception handling

* Fix abbreviations

* Rewrite to handle update of attached triggers

* Update abbreviation test

* Refactor according to review comments

* Refactor according to review comments

* Improve trigger removal

* Further refactoring
This commit is contained in:
Erik Montnemery authored and GitHub committed 2020-02-18 13:51:10 -08:00
1 parent f6540e3002
commit 60ae85564e
10 files changed
+1170 -34

No files matched your search

@@ -27,5 +27,27 @@
"error": {
"cannot_connect": "Unable to connect to the broker."
}
},
"device_automation": {
"trigger_type": {
"button_short_press": "\"{subtype}\" pressed",
"button_short_release": "\"{subtype}\" released",
"button_long_press": "\"{subtype}\" continuously pressed",
"button_long_release": "\"{subtype}\" released after long press",
"button_double_press": "\"{subtype}\" double clicked",
"button_triple_press": "\"{subtype}\" triple clicked",
"button_quadruple_press": "\"{subtype}\" quadruple clicked",
"button_quintuple_press": "\"{subtype}\" quintuple clicked"
},
"trigger_subtype": {
"turn_on": "Turn on",
"turn_off": "Turn off",
"button_1": "First button",
"button_2": "Second button",
"button_3": "Third button",
"button_4": "Fourth button",
"button_5": "Fifth button",
"button_6": "Sixth button"
}
}
}