Thank you both for your comprehensive replies and ideas .
I will have a go and see what happens
On Wednesday, 8 February 2023 at 23:16:16 UTC Warren Gill wrote:
> You can create a weewx template that outputs the statistics as a JSON
> file, then setup a REST sensor in your homeassistant config. You can set
> the scan interval to update more or less frequently. For me this seems more
> efficient than putting them in MQTT (which I also do with loop packets).
>
> My weewx template, *weather.json.tmpl* looks like:
>
> { "stationInfo" :
> {
> "stationType" : "$station.hardware",
> "stationCity" : "Austin",
> "stationState" : "TX",
> "stationElevation" : "$station.altitude",
> "stationLatitude" : "$station.latitude[0] $station.latitude[1]'
> $station.latitude[2]",
> "stationLongitude" : "$station.longitude[0] $station.longitude[1]'
> $station.longitude[2]"
> },
> "highs" :
> {
> "temperature" : "$day.outTemp.max.format(add_label=False)",
> "temperature_time" : "$day.outTemp.maxtime.raw",
> "humidity" : "$day.outHumidity.max.format(add_label=False)",
> "humidity_time" : "$day.outHumidity.maxtime.raw",
> "dewpoint" : "$day.dewpoint.max.format(add_label=False)",
> "dewpoint_time" : "$day.dewpoint.maxtime.raw",
> "windspeed" : "$day.wind.max.format(add_label=False)",
> "windspeed_time" : "$day.wind.maxtime.raw",
> "barometer" : "$day.barometer.max.format(add_label=False)",
> "barometer_time" : "$day.barometer.maxtime.raw",
> "rain_rate" : "$day.rainRate.max.format(add_label=False)",
> "rain_rate_time" : "$day.rainRate.maxtime.raw",
> "heat_index" : "$day.heatindex.max.format(add_label=False)",
> "heat_index_time" : "$day.heatindex.maxtime.raw"
> },
> "lows" :
> {
> "temperature" : "$day.outTemp.min.format(add_label=False)",
> "temperature_time" : "$day.outTemp.mintime.raw",
> "humidity" : "$day.outHumidity.min.format(add_label=False)",
> "humidity_time" : "$day.outHumidity.mintime.raw",
> "dewpoint" : "$day.dewpoint.min.format(add_label=False)",
> "dewpoint_time" : "$day.dewpoint.mintime.raw",
> "barometer" : "$day.barometer.min.format(add_label=False)",
> "barometer_time" : "$day.barometer.mintime.raw",
> "wind_chill" : "$day.windchill.min.format(add_label=False)",
> "wind_chill_time" : "$day.windchill.mintime.raw"
> }
> }
>
> Then I put in to HA, in packages/weather.yaml:
>
> # Example configuration.yaml entry
> rest:
> - resource: http://weather.local/weather.json
> method: GET
> scan_interval: 600
> sensor:
> - name: "Weather station information"
> json_attributes_path: "$.stationInfo"
> value_template: "OK"
> json_attributes:
> - "stationType"
> - "stationCity"
> - "stationState"
> - "stationElevation"
> - "stationLatitude"
> - "stationLongitude"
> - name: "Weather highs today"
> json_attributes_path: "$.highs"
> value_template: "OK"
> json_attributes:
> - "temperature"
> - "temperature_time"
> - "humidity"
> - "humidity_time"
> - "dewpoint"
> - "dewpoint_time"
> - "windspeed"
> - "windspeed_time"
> - "barometer"
> - "barometer_time"
> - "rain_rate_"
> - "rain_rate_time"
> - "heat_index"
> - "heat_index_time"
> - name: "Weather lows today"
> json_attributes_path: "$.lows"
> value_template: "OK"
> json_attributes:
> - "temperature"
> - "temperature_time"
> - "humidity"
> - "humidity_time"
> - "dewpoint"
> - "dewpoint_time"
> - "windspeed"
> - "windspeed_time"
> - "barometer"
> - "barometer_time"
> - "rain_rate_"
> - "rain_rate_time"
> - "heat_index"
> - "heat_index_time"
>
>
>
> On Wed, Feb 8, 2023 at 10:15 AM Tim Shepherd <[email protected]> wrote:
>
>> Hi,
>>
>> Is there any way to add parameters to those output via mqtt ?
>> I would like to record the Max and Min daily temperatures to Home
>> assistant but they are not available.
>>
>> The parameters highOutTemp_C and lowOutTemp_c are output but these are
>> some sort of statistical variation on the current temperature not the daily
>> max/min , and hence not what I want.
>>
>> Thanks
>>
>> --
>> 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 [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/weewx-user/b07932dd-4219-4a19-a678-ab74b1504a76n%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/weewx-user/b07932dd-4219-4a19-a678-ab74b1504a76n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/c6316605-d1a5-420e-a00b-4e0de0161f74n%40googlegroups.com.