Skip to content

Perform rounding directly in a MQTT sensor

xbmcnut edited this page Jul 19, 2020 · 2 revisions

Simply add a value_template.

Example:

sensor:
  - platform: mqtt
    name: iGrill Thermometer
    state_topic: "weber/temperature/grill/probe1"
    value_template: '{{ value | round(1) }}'
    device_class: temperature
    unit_of_measurement: '°C'
    expire_after: 30
    force_update: true
    qos: 0