Skip to content

Commit 2ac70b1

Browse files
committed
homeassistant.list_filtered_entities: rename input parameter label_id -> labels; update schema and docs; add docs preview README
1 parent ec069a4 commit 2ac70b1

File tree

4 files changed

+35
-5
lines changed

4 files changed

+35
-5
lines changed

custom_components/spook/ectoplasms/homeassistant/services/list_filtered_entities.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def _parse_service_call(
165165
domains = call.data.get("domains", [])
166166
integrations = call.data.get("integrations", [])
167167
status = call.data.get("status", [])
168-
label_id = call.data.get("label_id", [])
168+
labels = call.data.get("labels", [])
169169
values = call.data.get("values", [])
170170
limit = call.data.get("limit")
171171

@@ -182,7 +182,7 @@ def _parse_service_call(
182182
"domains": domains,
183183
"integrations": integrations,
184184
"status": status,
185-
"labels": label_id,
185+
"labels": labels,
186186
}
187187

188188
return filters, values, limit

custom_components/spook/services.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1324,7 +1324,7 @@ homeassistant_list_filtered_entities:
13241324
label: Not provided
13251325
- value: unmanageable
13261326
label: Unmanageable
1327-
label_id:
1327+
labels:
13281328
name: Labels
13291329
description: Filter by specific labels (OR logic within this filter).
13301330
required: false

documentation/README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Documentation preview quickstart
2+
3+
Run the local MyST preview for this folder.
4+
5+
- Using the VS Code task (recommended):
6+
7+
- Terminal > Run Task… > "Preview documentation"
8+
- It runs: `cd documentation && myst start`
9+
10+
- Using CLI (no global install needed):
11+
12+
- macOS with Homebrew Node 20:
13+
```bash
14+
export PATH="/opt/homebrew/opt/node@20/bin:$PATH"
15+
cd documentation
16+
uvx --from mystmd myst start
17+
```
18+
- Then open: http://localhost:3000
19+
- Stop with Ctrl+C
20+
21+
- Alternative with npx (if you prefer npm):
22+
```bash
23+
cd documentation
24+
npx mystmd myst start
25+
```
26+
27+
Notes
28+
29+
- Requires Node.js 20 or newer in your PATH.
30+
- Run the command from the `documentation/` directory (don’t pass extra flags like `--config` or `--serve`).

documentation/entities.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ The action supports comprehensive filtering by search terms, areas, devices, dom
326326
- {term}`string <string>` | {term}`list of strings <list>`
327327
- No
328328
- `["enabled", "available"]`
329-
* - `label_id`
329+
* - `labels`
330330
- {term}`string <string>` | {term}`list of strings <list>`
331331
- No
332332
- `["security", "automation_controlled"]`
@@ -422,7 +422,7 @@ List entities with specific labels:
422422
:linenos:
423423
action: homeassistant.list_filtered_entities
424424
data:
425-
label_id:
425+
labels:
426426
- security
427427
- automation_controlled
428428
values:

0 commit comments

Comments
 (0)