Commit Graph

14 Commits (24e0c0b092f5592d75fd2855fe17cc16ce57e316)

Author SHA1 Message Date
Jan Bouwhuis 2a2a20fcb3
Add mqtt sensor configurable state encoding for sensor and binary_sensor platform (#60447)
* Add mqtt sensor state encoding

* Make encoding attribute not specific to states

* Move encoding attribute to schema base
2021-11-30 14:04:24 +01:00
Jan Bouwhuis 879144b48d
MQTT rework constants (#57529)
* reference CONF_TOPIC to .const

* Organize common mqtt constants
2021-10-12 11:26:38 +02:00
Ville Skyttä b10fc89a6b
Automation trigger info type hint improvements (#55402)
* Make automation trigger info a TypedDict

* zwave_js trigger type hint fixes

* Remove redundant automation trigger info field presence checks

* Use async_initialize_triggers in mqtt and tasmota device_trigger tests
2021-09-04 02:25:51 +02:00
Erik Montnemery 4c9f12b9c5
Correct trace path for trigger with custom id (#51847) 2021-06-14 17:09:20 +02:00
Erik Montnemery 49bec86dae
Add base schema for triggers (#51727)
* Add base schema for triggers

* Tweak

* Make TRIGGER_BASE_SCHEMA a voluptuous schema

* Make state trigger BASE_SCHEMA a voluptuous schema
2021-06-11 09:51:12 +02:00
Erik Montnemery b26779a27a
Add id to automation triggers (#48464) 2021-03-31 14:56:04 +02:00
Franck Nijhof 6932cf9534
Use contextlib.suppress where possible (#48189) 2021-03-23 14:36:43 +01:00
Erik Montnemery 19cd29affa
Fix MQTT trigger where wanted payload may be parsed as an integer (#47162) 2021-02-28 12:19:27 -08:00
Erik Montnemery daf7595ca6
Support value_template in MQTT triggers (#46891)
* Support value_template in MQTT triggers

* Rename value_template to payload_template

* Revert "Rename value_template to payload_template"

This reverts commit 902094eefc.
2021-02-24 20:16:36 +01:00
Erik Montnemery 047f16772f
Support templating MQTT triggers (#45614)
* Add support for limited templates (no HASS access)

* Pass variables to automation triggers

* Support templates in MQTT triggers

* Spelling

* Handle trigger referenced by variables

* Raise on unsupported function in limited templates

* Validate MQTT trigger schema in MQTT device trigger

* Add trigger_variables to automation config schema

* Don't print stacktrace when setting up trigger throws

* Make pylint happy

* Add trigger_variables to variables

* Add debug prints, document limited template

* Add tests

* Validate MQTT trigger topic early when possible

* Improve valid_subscribe_topic_template
2021-02-08 10:50:38 +01:00
Erik Montnemery 97edbaa85f
Small cleanup of MQTT (#44110)
* Use relative imports of mqtt component in mqtt platforms

* Correct parameters to _async_setup_entity

* Lint
2020-12-10 21:30:07 +01:00
J. Nick Koston b51a160cce
Update triggers to use HassJob (#41450)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-10-08 09:44:34 +02:00
Phil Bruckner e6141ae558
Add description of what caused an automation trigger to fire (#39251)
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-08-28 17:02:12 +02:00
Phil Bruckner ca9dd0c833
Reorganize trigger code (#38655) 2020-08-17 11:54:56 -05:00