Well… For this case, I think an automation will fitt me more, or at least, I don’t know if I know how to achieve the same result through a mqtt sensor.
Look, this is my autiomation which gets the data from the Zigbee Temperature sensor.
alias: MQTT2Var - Ambient - Bathroom Temperature
description: ""
trigger:
- platform: mqtt
topic: tele/ZigBee_Bridge/59C2/SENSOR
condition:
- condition: template
value_template: >-
{{ 'EF00/0212' in trigger.payload_json['ZbReceived']['Bathroom_Ambient']
}}
- condition: template
value_template: >-
{{
is_number(trigger.payload_json['ZbReceived']['Bathroom_Ambient']['EF00/0212']
| multiply(0.1) | float | round(1)) }}
- condition: or
conditions:
- condition: template
value_template: >-
{{ (states('variable.bathroom_ambient_temperature') | float -
(trigger.payload_json['ZbReceived']['Bathroom_Ambient']['EF00/0212'] |
multiply(0.1) | float | round(1) - 0.50)) | abs | round(1) >= 1 }}
- condition: template
value_template: >-
{{ (as_timestamp(now()) -
as_timestamp(states.variable.bathroom_ambient_temperature.last_changed))
| int > 1800 }}
action:
- service: variable.set_variable
data:
variable: bathroom_ambient_temperature
value: |
{{ trigger.payload_json['ZbReceived']['Bathroom_Ambient']['EF00/0212'] |
multiply(0.1) | float | round(1) - 0.50 }}
- service: variable.set_variable
data:
variable: bathroom_ambient_temperature
attributes:
string_state: |
{% set var =
trigger.payload_json['ZbReceived']['Bathroom_Ambient']['EF00/0212'] |
multiply(0.1) | float | round(1) - 0.50 %}
{% if var <= 13 %}very low
{% elif 15 <= var <= 18 %}low
{% elif 20 <= var <= 25 %}normal
{% elif 27 <= var <= 30 %}high
{% elif var >= 32 %}very high
{% else %}
{{ state_attr("variable.bathroom_ambient_temperature","string_state")
}}
{% endif %}
mode: single
This sensor, it is sending data to zigbee two times per second (if you can imagine)… so, my bridge it is full of data, but this is not the problem, it can handle it. This autiomation do some restrictions to the received data, like you can see already. Set the variable by one of two grand condition, if 30 minutes passed or if the temperature it is changed by 1%…
As I said, I don’t know if I know how to achieve the same result with a mqtt senor. I say this because I have not even tried or thinked to try 
But… as I requested initally, I don’t want my autiomation trigger 100 times per minute, because a condition, will still run the automation, but it will not pass the condition. A payload instead, being as an option inside the trigger, I will help more, but if it is working like you said, this is no help…
That payload option should have something like template, I don’t know… 