docs/en/matter/ep_water_freeze_detector.rst
########################### MatterWaterFreezeDetector ###########################
The MatterWaterFreezeDetector class provides a water freeze detector endpoint for Matter networks. This endpoint implements the Matter water freeze detection standard for detecting water freeze conditions (detected/not detected states).
Features:
Use Cases:
Constructor
MatterWaterFreezeDetector ^^^^^^^^^^^^^^^^^^^^^^^^^^
Creates a new Matter water freeze detector endpoint.
.. code-block:: arduino
MatterWaterFreezeDetector();
Initialization
begin ^^^^^
Initializes the Matter water freeze detector endpoint with an initial freeze detection state.
.. code-block:: arduino
bool begin(bool _freezeState = false);
_freezeState - Initial water freeze detection state (true = detected, false = not detected, default: false)This function will return true if successful, false otherwise.
end ^^^
Stops processing Matter water freeze detector events.
.. code-block:: arduino
void end();
Water Freeze Detection State Control
setFreeze ^^^^^^^^^
Sets the water freeze detection state.
.. code-block:: arduino
bool setFreeze(bool _freezeState);
_freezeState - Water freeze detection state (true = detected, false = not detected)This function will return true if successful, false otherwise.
getFreeze ^^^^^^^^^
Gets the current water freeze detection state.
.. code-block:: arduino
bool getFreeze();
This function will return true if water freeze is detected, false if not detected.
Operators
bool operator ^^^^^^^^^^^^^
Returns the current water freeze detection state.
.. code-block:: arduino
operator bool();
Example:
.. code-block:: arduino
if (myDetector) {
Serial.println("Water freeze is detected");
} else {
Serial.println("Water freeze is not detected");
}
Assignment operator ^^^^^^^^^^^^^^^^^^^
Sets the water freeze detection state.
.. code-block:: arduino
void operator=(bool _freezeState);
Example:
.. code-block:: arduino
myDetector = true; // Set water freeze detection to detected
myDetector = false; // Set water freeze detection to not detected
Water Freeze Detector
.. literalinclude:: ../../../libraries/Matter/examples/MatterWaterFreezeDetector/MatterWaterFreezeDetector.ino :language: arduino