From 0b47074ce40e6f254fabc6b85df329d6d7f58738 Mon Sep 17 00:00:00 2001 From: G Johansson Date: Mon, 23 Sep 2024 14:20:34 +0200 Subject: [PATCH] Change valve state is enum (#2328) --- docs/core/entity/valve.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/core/entity/valve.md b/docs/core/entity/valve.md index 932dc0d1..8872b003 100644 --- a/docs/core/entity/valve.md +++ b/docs/core/entity/valve.md @@ -26,15 +26,16 @@ Properties should always only return information from memory and not do I/O (lik | `ValveDeviceClass.WATER` | Control of a water valve. | `ValveDeviceClass.GAS` | Control of a gas valve. - ### States -| Constant | Description -|----------|------------------------| -| `STATE_OPENING` | The valve is in the process of opening to reach a set position. -| `STATE_OPEN` | The valve has reached the open position. -| `STATE_CLOSING` | The valve is in the process of closing to reach a set position. -| `STATE_CLOSED` | The valve has reach the closed position. +The state is defined by setting it's properties. The resulting state is using the `ValveState` enum to return one of the below members. + +| Value | Description | +|----------|--------------------------------------------------------------------| +| `OPENING`| The valve is in the process of opening to reach a set position. | +| `OPEN` | The valve has reached the open position. | +| `CLOSING`| The valve is in the process of closing to reach a set position. | +| `CLOSED` | The valve has reached the closed position. | ## Supported features