I have set up the following wind sensor with mqtt which is working ok.
It reports every 10 seconds the wind speed in km/h. I think it was not designed for usage with home assistant but as I said it is working ok.
My problem is which would be the best way to integrate in HA in order if the wind speed is higher than 35 km/h to close the awning.
Since it is reporting the wind speed every 10 seconds I think if there is a spike of a wind gust at 35 the awning will close, but usually that average wind speed could be probably lower.
What logic I could use in order to be confident that the wind is actually high?
I am thinking for example (but I am not sure if this could be done in HA) to report the average value of the last 6 or 10 values (6 values =1 minute) using for example this component.
What do you think?
For my setup I used this mqtt and esp8266
My sensor right now is this one
- platform: mqtt
name: "Wind Speed"
state_topic: "anemometer/wind"
This is what I receive in HA Mqtt page
I haven’t received the anemometer yet, so the below test are from a small motor I have.
Listen to a topic
Listening to
anemometer/wind
Message 7 received on anemometer/wind at 12:10 AM:
0
QoS: 0 - Retain: false
Message 6 received on anemometer/wind at 12:09 AM:
0
QoS: 0 - Retain: false
Message 5 received on anemometer/wind at 12:09 AM:
6.61
QoS: 0 - Retain: false
Message 4 received on anemometer/wind at 12:09 AM:
9.48
QoS: 0 - Retain: false
Message 3 received on anemometer/wind at 12:09 AM:
0
QoS: 0 - Retain: false
Message 2 received on anemometer/wind at 12:09 AM:
9.48
QoS: 0 - Retain: false
Message 1 received on anemometer/wind at 12:09 AM:
5.22
QoS: 0 - Retain: false
Message 0 received on anemometer/wind at 12:09 AM:
0