Skip to content

Commit 3788e77

Browse files
author
Frank Klaassen
committed
Add UI instructions, examples, and standard actions include to Peblar RFID docs
1 parent dca3c51 commit 3788e77

4 files changed

Lines changed: 147 additions & 8 deletions

File tree

source/_actions/peblar.add_rfid_token.markdown

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,33 @@ The **Add RFID token** action adds a new RFID token to the Peblar charger's stan
1414

1515
{% include actions/try_it.md %}
1616

17+
{% include actions/ui_header.md %}
18+
19+
To add an RFID token from an automation or a script:
20+
21+
1. Go to {% my automations title="**Settings** > **Automations & scenes**" %}.
22+
2. Open an existing automation or script, or select **Create** to start a new one.
23+
3. In the **Then do** section, select **Add action**.
24+
4. From the search box, search for and select **Peblar: Add RFID token**.
25+
5. Under **Config entry**, select the Peblar charger to add the token to.
26+
6. Enter the **UID** of the RFID token. This is typically printed on the card or key fob.
27+
7. Enter a **Description** to identify the token, for example, the name of the person it belongs to.
28+
8. Select **Save**.
29+
30+
### Options in the UI
31+
32+
{% options_ui %}
33+
Config entry:
34+
description: The Peblar charger to add the RFID token to.
35+
required: true
36+
UID:
37+
description: The unique identifier of the RFID token to add. This is typically printed on the card or key fob.
38+
required: true
39+
Description:
40+
description: A human-readable label for this RFID token, for example, the name of the person it belongs to.
41+
required: true
42+
{% endoptions_ui %}
43+
1744
{% include actions/yaml_header.md %}
1845

1946
In YAML, refer to this action as `peblar.add_rfid_token`. A basic example looks like this:
@@ -46,3 +73,26 @@ description:
4673
required: true
4774
type: string
4875
{% endoptions_yaml %}
76+
77+
{% include actions/more_examples.md %}
78+
79+
### Automation: add a new RFID token when an input text is updated
80+
81+
When you update an input text helper with a new token UID and description, automatically add it to the charger.
82+
83+
{% details "YAML example for adding an RFID token from an input text" %}
84+
85+
{% example %}
86+
automation: |
87+
triggers:
88+
- trigger: state
89+
entity_id: input_text.new_rfid_uid
90+
actions:
91+
- action: peblar.add_rfid_token
92+
data:
93+
config_entry_id: "01234567890abcdef01234567890abcd"
94+
uid: "{{ states('input_text.new_rfid_uid') }}"
95+
description: "{{ states('input_text.new_rfid_description') }}"
96+
{% endexample %}
97+
98+
{% enddetails %}

source/_actions/peblar.list_rfid_tokens.markdown

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,33 @@ description: "Returns all RFID tokens currently configured in the Peblar charger
66
related:
77
- docs: /integrations/peblar/
88
title: Peblar
9+
- action: peblar.add_rfid_token
10+
- action: peblar.remove_rfid_token
911
---
1012

11-
The **List RFID tokens** action retrieves all RFID tokens stored in the Peblar charger's standalone authorization list. The action returns the full list as response data, which you can use in an automation or script to inspect or filter the tokens configured on your charger.
13+
The **List RFID tokens** action retrieves all RFID tokens stored in the Peblar charger's standalone authorization list. The action returns the full list as response data, which you can use in an automation or script to inspect or react to the tokens configured on your charger.
1214

1315
{% include actions/try_it.md %}
1416

17+
{% include actions/ui_header.md %}
18+
19+
To retrieve the RFID token list from an automation or a script:
20+
21+
1. Go to {% my automations title="**Settings** > **Automations & scenes**" %}.
22+
2. Open an existing automation or script, or select **Create** to start a new one.
23+
3. In the **Then do** section, select **Add action**.
24+
4. From the search box, search for and select **Peblar: List RFID tokens**.
25+
5. Under **Config entry**, select the Peblar charger to retrieve the tokens from.
26+
6. Select **Save**.
27+
28+
### Options in the UI
29+
30+
{% options_ui %}
31+
Config entry:
32+
description: The Peblar charger to retrieve the RFID token list from.
33+
required: true
34+
{% endoptions_ui %}
35+
1536
{% include actions/yaml_header.md %}
1637

1738
In YAML, refer to this action as `peblar.list_rfid_tokens`. A basic example looks like this:
@@ -32,3 +53,31 @@ config_entry_id:
3253
required: true
3354
type: string
3455
{% endoptions_yaml %}
56+
57+
{% include actions/more_examples.md %}
58+
59+
### Automation: send a notification with the current RFID token list
60+
61+
Retrieve all configured tokens and send yourself a summary as a notification.
62+
63+
{% details "YAML example for notifying with the RFID token list" %}
64+
65+
{% example %}
66+
automation: |
67+
triggers:
68+
- trigger: time
69+
at: "08:00:00"
70+
actions:
71+
- action: peblar.list_rfid_tokens
72+
data:
73+
config_entry_id: "01234567890abcdef01234567890abcd"
74+
response_variable: rfid_tokens
75+
- action: notify.mobile_app_your_phone
76+
data:
77+
title: "Peblar RFID tokens"
78+
message: >
79+
Currently authorized tokens:
80+
{{ rfid_tokens | map(attribute='description') | join(', ') }}
81+
{% endexample %}
82+
83+
{% enddetails %}

source/_actions/peblar.remove_rfid_token.markdown

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,29 @@ The **Remove RFID token** action deletes an RFID token from the Peblar charger's
1414

1515
{% include actions/try_it.md %}
1616

17+
{% include actions/ui_header.md %}
18+
19+
To remove an RFID token from an automation or a script:
20+
21+
1. Go to {% my automations title="**Settings** > **Automations & scenes**" %}.
22+
2. Open an existing automation or script, or select **Create** to start a new one.
23+
3. In the **Then do** section, select **Add action**.
24+
4. From the search box, search for and select **Peblar: Remove RFID token**.
25+
5. Under **Config entry**, select the Peblar charger to remove the token from.
26+
6. Enter the **UID** of the RFID token to remove.
27+
7. Select **Save**.
28+
29+
### Options in the UI
30+
31+
{% options_ui %}
32+
Config entry:
33+
description: The Peblar charger to remove the RFID token from.
34+
required: true
35+
UID:
36+
description: The unique identifier of the RFID token to remove.
37+
required: true
38+
{% endoptions_ui %}
39+
1740
{% include actions/yaml_header.md %}
1841

1942
In YAML, refer to this action as `peblar.remove_rfid_token`. A basic example looks like this:
@@ -40,3 +63,26 @@ uid:
4063
required: true
4164
type: string
4265
{% endoptions_yaml %}
66+
67+
{% include actions/more_examples.md %}
68+
69+
### Automation: remove an RFID token when a person leaves
70+
71+
When a person is marked as away from home, automatically remove their RFID token from the charger.
72+
73+
{% details "YAML example for removing an RFID token when someone leaves" %}
74+
75+
{% example %}
76+
automation: |
77+
triggers:
78+
- trigger: state
79+
entity_id: person.jane
80+
to: "not_home"
81+
actions:
82+
- action: peblar.remove_rfid_token
83+
data:
84+
config_entry_id: "01234567890abcdef01234567890abcd"
85+
uid: "04A1B2C3D4E5F6"
86+
{% endexample %}
87+
88+
{% enddetails %}

source/_integrations/peblar.markdown

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -229,13 +229,7 @@ Although this integration uses local polling, any configuration changes you make
229229
Peblar charger from Home Assistant will appear on the charger almost
230230
instantly.
231231

232-
## Actions
233-
234-
The Peblar integration provides the following actions to manage the RFID tokens in the charger's standalone authorization list.
235-
236-
- [List RFID tokens](/actions/peblar.list_rfid_tokens/) — returns all RFID tokens currently configured on the charger.
237-
- [Add RFID token](/actions/peblar.add_rfid_token/) — adds a new RFID token using a UID and description.
238-
- [Remove RFID token](/actions/peblar.remove_rfid_token/) — removes an RFID token by its UID.
232+
{% include integrations/actions.md %}
239233

240234
## Examples
241235

0 commit comments

Comments
 (0)