docs/en/zigbee/ep_pressure_sensor.rst
#################### ZigbeePressureSensor ####################
The ZigbeePressureSensor class provides an endpoint for pressure sensors in Zigbee networks. This endpoint implements the Zigbee Home Automation (HA) standard for pressure measurement devices, supporting atmospheric pressure, barometric pressure, and other pressure measurements.
Features:
Constructor
ZigbeePressureSensor ^^^^^^^^^^^^^^^^^^^^
Creates a new Zigbee pressure sensor endpoint.
.. code-block:: arduino
ZigbeePressureSensor(uint8_t endpoint);
endpoint - Endpoint number (1-254)API Methods
setPressure ^^^^^^^^^^^
Sets the pressure measurement value.
.. code-block:: arduino
bool setPressure(int16_t value);
value - Pressure value in hPaThis function will return true if successful, false otherwise.
setMinMaxValue ^^^^^^^^^^^^^^
Sets the minimum and maximum measurement values.
.. code-block:: arduino
bool setMinMaxValue(int16_t min, int16_t max);
min - Minimum pressure value in hPamax - Maximum pressure value in hPaThis function will return true if successful, false otherwise.
setDefaultValue ^^^^^^^^^^^^^^^
Sets the default (initial) value for the pressure sensor in 1 hPa. 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(int16_t defaultValue);
defaultValue - Default pressure value in hPaImportant: 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(uint16_t tolerance);
tolerance - Tolerance value in hPaThis function will return true if successful, false otherwise.
setReporting ^^^^^^^^^^^^
Sets the reporting configuration for pressure measurements.
.. code-block:: arduino
bool setReporting(uint16_t min_interval, uint16_t max_interval, uint16_t delta);
min_interval - Minimum reporting interval in secondsmax_interval - Maximum reporting interval in secondsdelta - Minimum change required to trigger a report in hPaThis function will return true if successful, false otherwise.
report ^^^^^^
Manually reports the current pressure value.
.. code-block:: arduino
bool report();
This function will return true if successful, false otherwise.
Pressure + Flow Sensor Implementation
.. literalinclude:: ../../../libraries/Zigbee/examples/Zigbee_Pressure_Flow_Sensor/Zigbee_Pressure_Flow_Sensor.ino :language: arduino