* Publish raw rendered mqtt payload as raw for mqtt publish action * Move check out of try block * Only try to eval `bytes` is payload starts with supported string Co-authored-by: Erik Montnemery <erik@montnemery.com> * Improve docst * Add `evaluate_bytes` option to publish action * Rename to `evaluate_payload` * Update homeassistant/components/mqtt/strings.json Co-authored-by: Erik Montnemery <erik@montnemery.com> * Extend test to assert literal_eval is called or not --------- Co-authored-by: Erik Montnemery <erik@montnemery.com>
48 lines
859 B
YAML
48 lines
859 B
YAML
# Describes the format for available MQTT services
|
|
|
|
publish:
|
|
fields:
|
|
topic:
|
|
required: true
|
|
example: /homeassistant/hello
|
|
selector:
|
|
text:
|
|
payload:
|
|
required: true
|
|
example: "The temperature is {{ states('sensor.temperature') }}"
|
|
selector:
|
|
template:
|
|
evaluate_payload:
|
|
advanced: true
|
|
default: false
|
|
selector:
|
|
boolean:
|
|
qos:
|
|
advanced: true
|
|
default: 0
|
|
selector:
|
|
select:
|
|
options:
|
|
- "0"
|
|
- "1"
|
|
- "2"
|
|
retain:
|
|
default: false
|
|
selector:
|
|
boolean:
|
|
|
|
dump:
|
|
fields:
|
|
topic:
|
|
example: "OpenZWave/#"
|
|
selector:
|
|
text:
|
|
duration:
|
|
default: 5
|
|
selector:
|
|
number:
|
|
min: 1
|
|
max: 300
|
|
unit_of_measurement: "seconds"
|
|
|
|
reload:
|