docs/en/zigbee/ep_wind_speed_sensor.rst
##################### ZigbeeWindSpeedSensor #####################
The ZigbeeWindSpeedSensor class provides a wind speed sensor endpoint for Zigbee networks. This endpoint implements the Zigbee Home Automation (HA) standard for wind speed measurement devices.
Features:
Use Cases:
Constructor
ZigbeeWindSpeedSensor ^^^^^^^^^^^^^^^^^^^^^
Creates a new Zigbee wind speed sensor endpoint.
.. code-block:: arduino
ZigbeeWindSpeedSensor(uint8_t endpoint);
endpoint - Endpoint number (1-254)API Methods
setWindSpeed ^^^^^^^^^^^^
Sets the wind speed measurement value.
.. code-block:: arduino
bool setWindSpeed(float value);
value - Wind speed value in 0.01 m/sThis function will return true if successful, false otherwise.
setMinMaxValue ^^^^^^^^^^^^^^
Sets the minimum and maximum measurement values.
.. code-block:: arduino
bool setMinMaxValue(float min, float max);
min - Minimum wind speed value in 0.01 m/smax - Maximum wind speed value in 0.01 m/sThis function will return true if successful, false otherwise.
setDefaultValue ^^^^^^^^^^^^^^^
Sets the default (initial) value for the wind speed sensor in 0.01 m/s. This value will be used as the initial measured value when the device is in factory reset mode and before the sensor provides actual readings.
.. code-block:: arduino
bool setDefaultValue(float defaultValue);
defaultValue - Default wind speed value in 0.01 m/sImportant: Must be called before adding the EP to Zigbee class. Only effective when the device is in factory reset mode (before commissioning/joining a network).
This function will return true if successful, false otherwise.
setTolerance ^^^^^^^^^^^^
Sets the tolerance value for measurements.
.. code-block:: arduino
bool setTolerance(float tolerance);
tolerance - Tolerance value in 0.01 m/sThis function will return true if successful, false otherwise.
setReporting ^^^^^^^^^^^^
Sets the reporting configuration for wind speed measurements.
.. code-block:: arduino
bool setReporting(uint16_t min_interval, uint16_t max_interval, float delta);
min_interval - Minimum reporting interval in secondsmax_interval - Maximum reporting interval in secondsdelta - Minimum change required to trigger a report in 0.01 m/sThis function will return true if successful, false otherwise.
reportWindSpeed ^^^^^^^^^^^^^^^
Manually reports the current wind speed value.
.. code-block:: arduino
bool reportWindSpeed();
This function will return true if successful, false otherwise.
Wind Speed Sensor Implementation
.. literalinclude:: ../../../libraries/Zigbee/examples/Zigbee_Wind_Speed_Sensor/Zigbee_Wind_Speed_Sensor.ino :language: arduino