Skip to content

Commit 441c296

Browse files
committed
Tighten frequency.type docs and document budget attribute
Drop the speculative even/odd type values that aren't verified against the B-hyve API, list interval alongside days (which the user's payload confirms), and add the program budget attribute to the Program Switch attributes table.
1 parent d87a07e commit 441c296

4 files changed

Lines changed: 10 additions & 9 deletions

File tree

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,10 @@ A **program** `switch` entity is created for each program attached to each zone.
164164
| `is_smart_program` | `boolean` | True if this is a _Smart Watering_ program. |
165165
| `start_times` | `string` | Configured start time for the program.<sup>†</sup> |
166166
| `frequency` | `object` | Watering schedule configuration.<sup>†</sup> |
167-
| `frequency.type` | `string` | Type of configuration. `days` is the only known value. |
168-
| `frequency.days` | `list[int]` | Configured days for watering. `0` is Sunday, `1` is Monday etc... |
167+
| `frequency.type` | `string` | Type of schedule. Known values: `days`, `interval`. |
168+
| `frequency.days` | `list[int]` | Configured days for watering (when `type` is `days`). `0` is Sunday, `1` is Monday etc... |
169+
| `frequency.interval` | `int` | Number of days between watering (when `type` is `interval`). |
170+
| `budget` | `int` | Watering budget as a percentage. Scales each zone's run time.<sup>†</sup> |
169171
| `run_times` | `list[object]` | Configured watering run times.<sup>†</sup> |
170172
| `run_times[].run_time` | `int` | Minutes of watering. |
171173
| `run_times[].station` | `int` | Zone id to water. |
@@ -185,7 +187,7 @@ This integration provides the following services:
185187
| `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 |
186188
| `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 |
187189
| `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 |
188-
| `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`, e.g. `days`, `interval`, `even`, `odd`) <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 |
190+
| `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 |
189191

190192
### `bhyve.update_program` example
191193

@@ -204,11 +206,10 @@ data:
204206
budget: 75
205207
```
206208
207-
The `frequency` object mirrors the B-Hyve API structure. Common `type` values:
209+
The `frequency` object mirrors the B-Hyve API structure. Known `type` values:
208210

209-
- `days` with `days: [0-6]` (where 0 is Sunday) to water on specific weekdays
211+
- `days` with `days: [0-6]` (where `0` is Sunday, `1` is Monday etc.) to water on specific weekdays
210212
- `interval` with `interval: N` to water every N days
211-
- `even` / `odd` to water on even or odd calendar days
212213

213214
The `budget` is a percentage that scales each zone's run time. `100` means unchanged, `50` halves every run time, `200` doubles it. Valid range is 0&ndash;200.
214215

custom_components/bhyve/services.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ update_program:
6969
description: List of watering start times in HH:MM format
7070
example: '["06:00", "18:00"]'
7171
frequency:
72-
description: Frequency configuration. `type` is required (e.g. days, interval, even, odd)
72+
description: Frequency configuration. `type` is required (known values: days, interval)
7373
example: '{"type": "days", "days": [1, 3, 5], "interval": 1, "interval_hours": 0}'
7474
budget:
7575
description: Watering budget as a percentage (0-200). Scales run times up or down

custom_components/bhyve/strings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
},
149149
"frequency": {
150150
"name": "Frequency",
151-
"description": "Frequency configuration object. Must include a 'type' key (e.g. days, interval, even, odd)"
151+
"description": "Frequency configuration object. Must include a 'type' key (known values: days, interval)"
152152
},
153153
"budget": {
154154
"name": "Budget",

custom_components/bhyve/translations/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
},
149149
"frequency": {
150150
"name": "Frequency",
151-
"description": "Frequency configuration object. Must include a 'type' key (e.g. days, interval, even, odd)"
151+
"description": "Frequency configuration object. Must include a 'type' key (known values: days, interval)"
152152
},
153153
"budget": {
154154
"name": "Budget",

0 commit comments

Comments
 (0)