Hello Weather observers,

since long time my weewx server is running - and  updated to latest 5.0.2 
version.

I want to export MQTT messages to Home Assistant, but the numbers are too 
long.
How can I make them shorter?
Example:
outHumidity = 91.0
inHumidity = 56.0
outTemp_C = 3.777777777777776
inTemp_C = 22.88888888888889
windSpeed_kph = 9.0123264
windGust_kph = 9.3341952


I have tried to format it through format = %.1f , but it does not seems to 
work

My MQTT Configuration:

[[MQTT]]
        server_url = mqtt://xxx:xxx@localhost:1883/
        topic = weather
        unit_system = METRIC
        binding = archive, loop
        aggregation = individual
        log_success = False
        log_failure = True
        [[[inputs]]]
            [[[[outTemp]]]]
                name = inside_temperature  # use a label other than outTemp
                format = %.1f              # two decimal places of precision
                unit = degree_F            # convert outTemp to F, others 
in C
            [[[[inTemp]]]]
                unit = degree_C                 # use F instead of C
                format = %.1f                   # use two decimal places of 
precision
                name = inside_temperature       # use label other than 
inTemp
            [[[[windSpeed]]]]
                units = meter_per_second        # use knots instead of 
meter_per_second
                format = %.1f                   # use two decimal places of 
precision
                name = wind_speed               # use label other than 
inTemp

Thank you!
Michal

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/e383f0fa-0ee6-43de-9a87-63480cc5d2f7n%40googlegroups.com.

Reply via email to