Skip to content

Commit 9741049

Browse files
committed
Correct README against current entity/platform layout
- Zones are documented as valve entities (BHyveZoneValve extends ValveEntity); rename the Zone Switch section to Zone Valve and point all zone-scoped service examples and the python script snippet at valve.*_zone instead of switch.*_zone. - Rewrite the Supported Entities list so valve, select and the smart watering switch appear, and so the switch/sensor/binary_sensor entries match what the integration actually creates. - Add short sections for the previously-undocumented entities: temperature sensor, signal strength sensor, fault binary_sensor, connectivity binary_sensor, smart watering switch, device mode select. - Document the station and next_start_* attributes exposed on zone valve entities. - Lowercase the program slot letters (a/b/c/e) to match the actual attribute keys (program_a, program_b, ...). Services are re-described with zone valve wording. Broken services (enable/disable_rain_delay, set_manual_preset_runtime, start_program on the valve domain) are left in the table at their intended behaviour and will be fixed in a separate PR.
1 parent 441c296 commit 9741049

1 file changed

Lines changed: 61 additions & 31 deletions

File tree

README.md

Lines changed: 61 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,11 @@ _Note_: The Wifi hub is required to provide the flood sensors with internet conn
3131

3232
## Supported Entities
3333

34-
- `sensor` for measuring battery levels and watering history of `sprinkler_timer` devices as well as the device on/off state (not to be confused with zone on/off switches).
35-
- `temperature sensor` for measuring the temperature at the device.
36-
- `switch` for turning a zone on/off, enabling/disabling rain delays and toggling pre-configured programs.
37-
- `binary_sensor` for `flood_sensor` devices which provide liquid detection and temperature alerts when out of threshold.
34+
- `valve` for opening/closing individual zones on `sprinkler_timer` devices.
35+
- `sensor` for battery levels, zone watering history, device run-mode state, flood-sensor temperature and flood-sensor signal strength.
36+
- `switch` for enabling/disabling rain delays, toggling pre-configured programs and enabling/disabling per-zone smart watering.
37+
- `select` for the device run-mode (auto/off) on `sprinkler_timer` devices.
38+
- `binary_sensor` for flood detection, temperature alerts, sprinkler station faults and Wi-Fi bridge connectivity.
3839

3940
## Installation
4041

@@ -74,11 +75,11 @@ A **battery** `sensor` entity is created for any device which has a battery leve
7475

7576
### Device State sensor
7677

77-
A **device state** `sensor` entity is created for each device. This reports the state of the device, for example `auto` or `off`. A device may be switched to `off` either manually through the B-hyve app, or may be automatically set when battery levels are too low to operate the device correctly.
78+
A **device state** `sensor` entity is created for each `sprinkler_timer` device. This reports the state of the device, for example `auto` or `off`. A device may be switched to `off` either manually through the B-hyve app, or may be automatically set when battery levels are too low to operate the device correctly.
7879

7980
### Zone Watering History sensor
8081

81-
A **zone history** `sensor` entity is created for each zone. This reports the history of zone watering.
82+
A **zone history** `sensor` entity is created for each zone on a `sprinkler_timer` device. This reports the history of zone watering.
8283

8384
The following attributes are set on zone history sensor entities:
8485

@@ -93,52 +94,71 @@ The following attributes are set on zone history sensor entities:
9394
| `consumption_litres` | `number` | The amount of water consumed, in litres. |
9495
| `start_time` | `string` | The start time of the watering. |
9596

96-
## Binary Sensor Entities
97+
### Temperature sensor
98+
99+
A **temperature** `sensor` entity is created for each `flood_sensor` device, reporting the ambient temperature in degrees Fahrenheit.
100+
101+
### Signal strength sensor
97102

98-
The BHyve flood sensor provides the following `binary_sensor` entities:
103+
A **signal strength** `sensor` entity is created for each `flood_sensor` device, reporting the Wi-Fi RSSI in dBm.
104+
105+
## Binary Sensor Entities
99106

100107
### Water/Flood
101108

102-
A **binary_sensor** that turns on if water is detected.
109+
A **binary_sensor** is created for each `flood_sensor` device. It turns on if water is detected.
103110

104111
### Temperature Alert
105112

106-
A **binary_sensor** that turns on if the detected temperature is over or under the set threshold. The threshold values should be set using the BHyve app.
113+
A **binary_sensor** is created for each `flood_sensor` device. It turns on if the detected temperature is over or under the set threshold. The threshold values should be set using the BHyve app.
107114

108-
## Switch Entities
115+
### Fault
116+
117+
A **binary_sensor** is created for each `sprinkler_timer` device. It turns on when B-hyve reports one or more station faults, with the raw fault list exposed via the `station_faults` attribute.
118+
119+
### Connectivity
120+
121+
A **binary_sensor** is created for each Wi-Fi hub / bridge device, reporting whether the bridge is currently online.
109122

110-
### Zone Switch
123+
## Valve Entities
111124

112-
A **zone** `switch` entity is created for each zone of a `sprinkler_timer` device. This switch enables starting/stopping irrigation of a zone. Turning on the switch will enable watering of the zone for a "default" amount of time.
125+
### Zone Valve
113126

114-
This default is often indicated by the `manual_preset_runtime` attribute, and this can be set using the `set_manual_preset_runtime` service or configured in the B-hyve app.
127+
A **zone** `valve` entity is created for each zone of a `sprinkler_timer` device. Opening the valve starts watering the zone for a "default" amount of time; closing it stops watering.
128+
129+
The default run time is often indicated by the `manual_preset_runtime` attribute, and this can be set using the `set_manual_preset_runtime` service or configured in the B-hyve app.
115130

116131
> [!NOTE]
117132
> Some BHyve devices do not have the ability to set the default watering time, and it is recommended that you use the `bhyve.start_watering` service to start the watering zone with the desired number of minutes.
118133
119-
The following attributes are set on zone switch entities:
134+
The following attributes are set on zone valve entities:
120135

121136
| Attribute | Type | Notes |
122137
| ----------------------------- | -------------- | -------------------------------------------------------------------------- |
123138
| `zone_name` | `string` | The name of the zone |
124139
| `device_id` | `string` | The id of the device which this zone belongs to |
125140
| `device_name` | `string` | The name of the device which this zone belongs to |
126-
| `manual_preset_runtime` | `number` | The number of seconds to run zone watering when switch is turned on. |
141+
| `station` | `number` | The station number of the zone on the device. |
142+
| `manual_preset_runtime` | `number` | The number of seconds to run zone watering when the valve is opened. |
127143
| `smart_watering_enabled` | `boolean` | True if the zone has a smart water schedule enabled. |
128-
| `sprinkler_type` | `string` | The configured type of sprinker. |
144+
| `sprinkler_type` | `string` | The configured type of sprinkler. |
129145
| `image_url` | `string` | The url to zone image. |
130146
| `started_watering_station_at` | `string` | The timestamp the zone started watering. |
131-
| `program_x` | `object` | Provides details on any configured watering programs for the given switch. |
147+
| `next_start_time` | `string` | ISO-8601 timestamp of the next scheduled watering, if any. |
148+
| `next_start_programs` | `list[string]` | The programs scheduled to run at `next_start_time`. |
149+
| `program_x` | `object` | Provides details on any configured watering programs for the given zone. |
132150
| `program_e[watering_program]` | `list[string]` | List of timestamps for future/scheduled watering times.<sup>†</sup> |
133151

134152
<sup>†</sup> Only applicable if a Smart Watering program is enabled. Any rain delays or other custom programs must be considered separately.
135153

136154
#### `program_x` attribute
137155

138-
Any watering programs which are configured for a zone switch are made available as an attribute. The `X` denotes the letter of the program slot. Values `A`, `B` and `C` are well known custom slots. Program `E` is reserved for the Smart Watering plan. Slot `D` does not have a known use at this stage.
156+
Any watering programs which are configured for a zone are made available as an attribute. The `x` denotes the (lowercase) letter of the program slot. Values `a`, `b` and `c` are well-known custom slots. Program `e` is reserved for the Smart Watering plan. Slot `d` does not have a known use at this stage.
139157

140158
Please see [program switches](#program-switch) below for more details.
141159

160+
## Switch Entities
161+
142162
### Rain Delay Switch
143163

144164
A **rain delay** `switch` entity is created for each discovered `sprinkler_timer` device. This entity will be **on** whenever B-hyve reports that a device's watering schedule will be delayed due to weather conditions.
@@ -174,18 +194,28 @@ A **program** `switch` entity is created for each program attached to each zone.
174194

175195
<sup>†</sup> Not available on _Smart Watering_ programs
176196

197+
### Smart Watering Switch
198+
199+
A **smart watering** `switch` entity is created for each zone that has smart watering as an available feature. Toggling the switch enables or disables the Smart Watering schedule for that zone.
200+
201+
## Select Entities
202+
203+
### Device Mode
204+
205+
A **device mode** `select` entity is created for each `sprinkler_timer` device, with options `auto` and `off`. This mirrors the device-level run mode exposed by the B-hyve app.
206+
177207
## Services
178208

179209
This integration provides the following services:
180210

181211
| Service | Parameters | Description |
182212
| --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
183-
| `bhyve.start_watering` | `entity_id` - zone(s) entity to start watering. This should be a reference to a zone switch entity <br/> `minutes` - number of minutes to water for | Start watering a zone for a specific number of minutes |
184-
| `bhyve.stop_watering` | `entity_id` - zone(s) entity to stop watering. This should be a reference to a zone switch entity | Stop watering a zone |
185-
| `bhyve.enable_rain_delay` | `entity_id` - device to enable a rain delay. This can reference either a zone or rain delay switch <br/> `hours` - number of hours to enable a rain delay | Enable a rain delay for a device for a specified number of hours |
186-
| `bhyve.disable_rain_delay` | `entity_id` - device to enable a rain delay. This can reference either a zone or rain delay switch | Cancel a rain delay on a given device |
187-
| `bhyve.set_manual_preset_runtime` | `entity_id` - zone(s) entity to set the preset runtime. This should be a reference to a zone switch entity <br/> `minutes` - number of minutes to water for | Set the default time a switch is activated for when enabled. Support for this service appears to be patchy, and it has been difficult to identify the devices or under which conditions it works |
188-
| `bhyve.set_smart_watering_soil_moisture` | `entity_id` - zone(s) entity to set the moisture level for. This should be a reference to a zone switch entity <br/> `percentage` - soil moisture level between 0 - 100 | Set Smart Watering soil moisture level for a zone |
213+
| `bhyve.start_watering` | `entity_id` - zone(s) entity to start watering. This should be a reference to a zone valve entity <br/> `minutes` - number of minutes to water for | Start watering a zone for a specific number of minutes |
214+
| `bhyve.stop_watering` | `entity_id` - zone(s) entity to stop watering. This should be a reference to a zone valve entity | Stop watering a zone |
215+
| `bhyve.enable_rain_delay` | `entity_id` - device to enable a rain delay. This can reference either a zone valve or rain delay switch <br/> `hours` - number of hours to enable a rain delay | Enable a rain delay for a device for a specified number of hours |
216+
| `bhyve.disable_rain_delay` | `entity_id` - device to disable a rain delay. This can reference either a zone valve or rain delay switch | Cancel a rain delay on a given device |
217+
| `bhyve.set_manual_preset_runtime` | `entity_id` - zone(s) entity to set the preset runtime. This should be a reference to a zone valve entity <br/> `minutes` - number of minutes to water for | Set the default time a zone is watered for when the valve is opened. Support for this service appears to be patchy, and it has been difficult to identify the devices or under which conditions it works |
218+
| `bhyve.set_smart_watering_soil_moisture` | `entity_id` - zone(s) entity to set the moisture level for. This should be a reference to a zone valve entity <br/> `percentage` - soil moisture level between 0 - 100 | Set Smart Watering soil moisture level for a zone |
189219
| `bhyve.start_program` | `entity_id` - program entity to start. This should be a reference to a program switch entity | Starts a pre-configured watering program. Watering programs cannot be created via this integration and must first be set up in the B-Hyve app |
190220
| `bhyve.update_program` | `entity_id` - program switch to update <br/> `start_times` - _(optional)_ list of watering start times in `HH:MM` format <br/> `frequency` - _(optional)_ frequency configuration object (must include a `type`, known values: `days`, `interval`) <br/> `budget` - _(optional)_ watering budget as a percentage (0-200) | Update the configuration of an existing non-smart program. At least one of `start_times`, `frequency` or `budget` must be provided |
191221

@@ -238,12 +268,12 @@ Usage:
238268
```yaml
239269
service: python_script.bhyve_next_watering
240270
data:
241-
entity_id: switch.backyard_zone
271+
entity_id: valve.backyard_zone
242272
```
243273

244-
| Argument | Type | Required | Notes |
245-
| ----------- | -------- | -------- | -------------------------------- |
246-
| `entity_id` | `string` | `True` | The entity id for a zone switch. |
274+
| Argument | Type | Required | Notes |
275+
| ----------- | -------- | -------- | ------------------------------- |
276+
| `entity_id` | `string` | `True` | The entity id for a zone valve. |
247277

248278
### Automation
249279

@@ -254,13 +284,13 @@ automation:
254284
- alias: B-hyve next watering & rain delay finishing updater
255285
trigger:
256286
- platform: state
257-
entity_id: switch.backyard_zone, switch.rain_delay_lawn
287+
entity_id: valve.backyard_zone, switch.rain_delay_lawn
258288
- platform: homeassistant
259289
event: start
260290
action:
261291
- service: python_script.bhyve_next_watering
262292
data:
263-
entity_id: switch.backyard_zone
293+
entity_id: valve.backyard_zone
264294
```
265295

266296
## Debugging

0 commit comments

Comments
 (0)