My personal weather station sensors provide more information that I can currently add with the available data_type options. I would like to help and add more data types.
Browsing that code and looking at the sensor attributes in HA, I can see that a number of values are already in the library. I need / like to have them as separate sensors in HA, so they should be added to the sensor.rfxtrx component, don’t they?
I’m interested in this functionality as well. I have a rainmeter that I have added as a rfxtrx sensor. It’s a
Oregon PCR800. I can use the “Rain rate” datatype but I can not access the “Rain total” data the sensor delivers, as a own datatype. Is it possible to do this? sensor.rain_cum_rain_rate 0.0 Rain rate: 0 Rain total: 75.6 Battery numeric: 9 Rssi numeric: 7 unit_of_measurement: friendly_name: rain_cum Rain rate
Got it. Figured out hot to access it with template sensor and sensor attribute data: value_template: '{{ states.sensor.rain_cum_rain_rate.attributes["Rain total"] }}'
The Wgr800 included fine with hass/Rfxtrx433. I use template sensors to show all attributes as sensors. But the Temperature and Chill attributes do not seem to update and keep reporting a fixed value that makes no sense to me. Will start a new thread on that one.
I really don’t know how to access the wind attributes. No idea why HA taggs this device as “temperature” and no idea either why the sensor seems to be publishing temperature, even less when the values it reports are non-sense. I must be missing something.
I am on my phone, so cannot post yaml example right now, but sensors have a state. The state is what you typically see in the GUI. But in addition, sensors can also have attributes. The state of this wind sensor is temperature, I don’t know why.
In order to use the attributes as states, you have to define new sensors that read this wind sensors attributes. Look up template sensors in the documentation, they do just that.
I will read the documentation but if you ever get around to doing it, I would be very thankful if you could post your setup. That would be awesome. Just to confirm: you are suggesting I can find the information here right?
I have had a server crash, so this is from an old (yes, I feel stupid and ashamed ) backup. I am not 100% sure it will work right out of the box, because I changed it a little (translated to English from Norwegian) without testing it afterwards.
This example shows how to extract sensor attributes into sensor states, each attribute will be a single (template) sensor.
The yaml below is my sensors.yaml which is included in configuration.yaml by the include directivesensor: !include sensors.yaml
- platform: template
sensors:
wgr_800_battery_state:
friendly_name: Wind battery
value_template: '{{state_attr("sensor.oregon_wgr_800", "Battery numeric") }}'
unit_of_measurement: "%"
wgr_800_temperature:
friendly_name: Wind temperature #Not working right
value_template: '{{state_attr("sensor.oregon_wgr_800_temperature", "Temperature") }}'
unit_of_measurement: "°C"
wgr_800_windchill:
friendly_name: Wind chill #Not working right
value_template: '{{state_attr("sensor.oregon_wgr_800_temperature", "Chill") }}'
unit_of_measurement: "°C"
wgr_800_windspeed_average:
friendly_name: Wind average
value_template: '{{state_attr("sensor.oregon_wgr_800_temperature", "Wind average speed") }}'
unit_of_measurement: "m/s"
wgr_800_windspeed_gust:
friendly_name: Wind gust
value_template: '{{state_attr("sensor.oregon_wgr_800_temperature", "Wind gust") }}'
unit_of_measurement: "m/s"
wgr_800_wind_direction:
friendly_name: Wind direction
value_template: '{{state_attr("sensor.oregon_wgr_800_temperature", "Wind direction") }}'
unit_of_measurement: "°"
wgr_800_wind_direction_text:
friendly_name: Wind direction text
value_template: >-
'{% if not is_state("sensor.wgr_800_wind_direction", "None") %}
{% set wd = states("sensor.wgr_800_wind_direction") | int %}
{% if wd <= 11 or wd > 348 %}N
{% elif wd >11 and wd <=34 %}NNE
{% elif wd >34 and wd <=56 %}NE
{% elif wd >56 and wd <=79 %}ENE
{% elif wd >79 and wd <=101 %}E
{% elif wd >101 and wd <=124 %}ESE
{% elif wd >124 and wd <=146 %}SE
{% elif wd >146 and wd <=169 %}SSE
{% elif wd >169 and wd <=191 %}S
{% elif wd >191 and wd <=214 %}SSW
{% elif wd >214 and wd <=236 %}SW
{% elif wd >236 and wd <=259 %}WSW
{% elif wd >259 and wd <=281 %}W
{% elif wd >281 and wd <=304 %}WNW
{% elif wd >304 and wd <=326 %}NW
{% elif wd >326 and wd <=348 %}NNW
{% endif %}
{% else %}
Invalid direction
{% endif %}'
What I will probably do when I have the time, is to use these sensors in a statistics sensor, to get less noisy data and be able to see max/min values. But first have have some work to do putting my new NUC together and install Ubuntu with Docker…
I receive the weather station information from my neighbor and the temperature is a swapping. I see the same value in the print screen from kitus. The temperate swaps between the actual temperature and a fixed value “Temperature: 2674”. What is this 2674 and how to show the right temp. in HA?
Hi rdekker,
I’m having exactly the same problem. Temperature switching between the actual temperature and that fixed value 2674.
Did you had any luck how to fix this?
[edit] @rdekker
I made a new topic, maybe you can add details that could help.
Hi @etomaka, do you still use the Oregon Rain Gauge? I would like to have your feedback on it. I’m using the PCR800x model, and I’m under the impression that the readouts are no accurate. I would be interested in experience.