Authorize a charge session
The Authorize charge session action presents a token to the Peblar charger, as if the card or key fob were held against the reader. Use it to let a charging session start without walking up to the charger.
This action toggles. A session that is waiting for authorization gets it, and a session that is already running is stopped. That is what holding a card against the reader does, and this action does the same thing.
The token has to be in the charger’s standalone authorization list. Use List RFID tokens to see what is on it, and Add RFID token to put something new there.
Try it yourself
Ready to test this? Open Settings > Tools > Actions, search for this action, fill in the fields, and select Perform action. You see what happens on your actual entitiesAn entity represents a sensor, actor, or function in Home Assistant. Entities are used to monitor physical properties or to control other entities. An entity is usually part of a device or a service. [Learn more] without writing a line of YAML.
Using this action from the user interface
If you prefer building automations and scripts visually, Home Assistant walks you through this action step by step. You pick what to target, tweak a few options, and save. No YAML knowledge required.
To authorize a charge session from an automation or a script:
- Go to Settings > Automations & scenes.
- Open an existing automation or script, or select Create to start a new one.
- In the Then do section, select Add action.
- From the search box, search for and select Peblar: Authorize charge session.
- Under Peblar EV charger, select the Peblar charger to present the token to.
- Enter either the UID of the token, or its Description. Fill in one of the two, not both.
- Select Save.
Options in the UI
Using this action in YAML
If you work directly in YAML, or you want to know exactly what Home Assistant does under the hood, this section has the technical reference. It lists the field names you use in YAML, their types, and which ones are required.
In YAML, refer to this action as peblar.authorize_charge_session. A basic example looks like this:
action: peblar.authorize_charge_session
data:
config_entry_id: "01234567890abcdef01234567890abcd"
uid: "04A1B2C3D4E5F6"
Options in YAML
The unique identifier (UID) of the RFID token to present. Provide either this or description. You must provide one of the two.
Good to know
- Only administrators can run this action.
- The charger accepts the request and acts on it a moment later, so watch the charger’s state to see the result rather than the action itself.
- This action does not apply to every charger:
- Chargers without an RFID reader do not have a standalone authorization list.
- Chargers managed over OCPP have their sessions authorized by the OCPP back-end system.
- Chargers set to charge without authorization have nothing to authorize.
More examples
Real scenarios where this action shows up in automations and scripts. Copy any example and adapt it to your setup.
You don’t need to edit YAML to use these examples. Copy a YAML snippet from this page, open the automation editor in Home Assistant, and press Ctrl+V (or Cmd+V on Mac). Home Assistant automatically converts the pasted YAML into the visual editor format, whether it’s a full automation, a single trigger, a condition, or an action.
Automation: authorize the charger when you arrive home
When you get home and a cable is plugged in, present your token so charging can start.
YAML example for authorizing on arrival
triggers:
- trigger: state
entity_id: person.jane
to: "home"
conditions:
- condition: state
entity_id: sensor.peblar_ev_charger_cp_state
state: "suspended"
actions:
- action: peblar.authorize_charge_session
data:
config_entry_id: "01234567890abcdef01234567890abcd"
description: "Jane's key fob"
Still stuck?
The Home Assistant community is quick to help: join Discord for real-time chat, post on the community forum with the action you’re calling and what you expected to happen, or share on our subreddit /r/homeassistant.
AI assistants like ChatGPT or Claude can also explain actions or suggest the right one when you describe what you want in plain language.