Thanks to all especially @parrel for keeping this active. I am having issues and very confused with the new template configuration vs the legacy. I had it working previously but mistakenly deleted that portion yaml.
My configuration.yaml has the file split as follows
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
binary_sensor: !include binary_sensor.yaml
sensor: !include sensor.yaml
camera: !include cameras.yaml
Does anyone have @parrel configuration.yaml broken into the sensor.yaml?
The TFA 30.3161 is good available in the Netherlands for about 20 euros including shipping costs.
The advantage of this rain gauge is that there is more space for the Aqara sensor. I temporarily glued a magnet on the buckets. There is still room for a magnet on the side. I have ordered these small magnets. The magnet on the tray shows no measurable differences in the measurements.
I slid the sensor into the waterproof housing with some packing foam.
If you have found the right position, the sensor does not affect the operation of the buckets and indicates 100% reliable ticks!
There’s instructions in the first post where they already figured out the surface area and the math.
Then I just created a helper and set the step size to that value. So every tip, it increments by that amount.
But I figure if you are using a different style device with a different surface area a round about way to do it if you’re not a surface area physicist.
setup the smart device next to an old school rain gauge
Reset # of tips to 0
Wait for rain
Check old school rain gauge. Lets say it shows .1" of rain
Look at # of tips, lets say its 25
.1" of rain divided by 25 tips = .004"
Set the helper to increment by .004 for every tip
Thats kinda what I did to tweak my number. You can see the gauge showed more rain that what the sensor counted, so I just needed to tweak by number it increments by slightly. Now I am pretty much right on everytime (or close enough for my purposes)
To calibrate I worked out the surface area in mm2. this will give you milliliters per 1mm rain. Then worked out how many of those 1mm of rain were in 200 ml of water. Poured 200 ml of water through and counted the tips, repeated this 4 times and averaged the result.
For folks that have to suffer with imperial measurements, how do you handle this section of the template sensor?
- sensor:
- name: Rainfall today
unit_of_measurement: mm
state_class: total_increasing
unique_id: rainfall_today
state: >-
{% set count = states('sensor.rainsensor_flips') | int(0) %}
{% set mm = count * 0.30303 %}
{% if count >= 0 %}
{{ mm|round(1, 'floor') }}
{% endif %}
# If you have issues with the history sensor doubling after restarting HA, add the line below (@BigG)
availability: "{{ (states('sensor.rainsensor_flips') not in ('unknown', 'unavailable')) }}"
I also got 6 tips per 10ml so I used 0.30303mm per tip. If you use inches, it’s 0.01193 inch per tip. We can use that in a sensor to calculate the rainfall today, or in a week, or month, etcetera.
It’s a nice project. I want integrate my rain (simular like your’s descrbibed in this topic)
gauge into homeassistant. Is it possible to receive all yaml files of this project?
=> or an whole example? (here in the topic is missing: ESP32 / ESP2866 / nodemcu platform, config for wifi etc.)