WeeWX, MQTT and how to import Data

Please read this topic, especially point 11 regarding the correct formatting of code in the forum.

You can use a value_template to round your value.

Try this:

sensor:
  - platform: mqtt
    name: “OutTemperature1”
    state_topic: “weather/outTemp_C”
    unit_of_measurement: ‘°C’
    value_template: "{{ (value | round(2)) | float }}"

I’m not sure if the last float filter is needed, you can probably remove it, can’t test at the moment.

2 Likes