Connect Your Portable EV Charger to Home Assistant
A complete install and integration guide using the Tuya Local custom integration. No cloud subscription, no monthly fees, full local control.
A complete install and integration guide using the Tuya Local custom integration. No cloud subscription, no monthly fees, full local control.
Home assistant is a free opensource community that interfaces to most smart devices. It allows you to control the devices from your phone or P.C.
https://www.home-assistant.io/
Home assistant runs on a PC, however it’s recommended to use a dedicated platform such as the home assistant green that starts at around $350
https://www.home-assistant.io/green/
After following this guide, your EV charger will appear in Home Assistant as a fully local device with the following entities:
Everything polls locally over your LAN, so it keeps working if your internet drops, and there’s no rate-limiting from the Tuya cloud.
This guide is for the following chargers.
You’ll need:
The charger has to go through the Tuya/Smart Life app once, so the cloud can issue it a local encryption key. After this, your phone is optional.
Tuya Local talks to the device directly over your LAN, so the charger’s IP address needs to stay stable. The cleanest way is to set a DHCP reservation in your router based on the charger’s MAC address. Refer to your router’s documentation for the exact steps — most routers have a “DHCP reservation” or “Static lease” section under LAN settings.
Make a note of the reserved IP. You’ll need it briefly in Step 4.
This is the YAML file that tells Tuya Local how to translate the charger’s raw data points into Home Assistant entities — switch, slider, voltage, current, power, and so on. You need to put it in place before adding the charger so Tuya Local recognises the device on the first try.
/homeassistant/custom_components/tuya_local/devices/.portable_evcharger.yaml.name: EV charger
# Single template covering both Smart EV Charger models:
# - 6-10A portable (hardware enforces 6/8/10A steps internally)
# - 16A portable (hardware enforces 6/8/10/12/14/16A steps internally)
products:
- id: gz7brfamdlvyagvt
manufacturer: Smart EV Charger
model: Portable EV Charger
- id: e1mr37qs
manufacturer: Smart EV Charger
model: Portable EV Charger (legacy ID)
entities:
- entity: switch
name: Charger
icon: "mdi:ev-station"
dps:
- id: 18
type: boolean
name: switch
- entity: sensor
name: Status
class: enum
icon: "mdi:ev-plug-type2"
category: diagnostic
dps:
- id: 3
type: string
name: sensor
mapping:
- dps_val: charger_free
value: Idle
- dps_val: charger_insert
value: Connected
- dps_val: charger_wait
value: Waiting
- dps_val: charger_charging
value: Charging
- dps_val: charger_pause
value: Paused
- dps_val: charger_end
value: Finished
- dps_val: charger_fault
value: Fault
- dps_val: charger_free_fault
value: Idle (fault)
- entity: number
name: Charge current
category: config
class: current
# Protocol accepts 6-16. Hardware limits:
# 6-10A model -> only 6/8/10 are accepted by the unit
# 16A model -> only 6/8/10/12/14/16 are accepted by the unit
dps:
- id: 4
type: integer
name: value
unit: A
range:
min: 6
max: 16
- entity: select
name: Charging mode
category: config
dps:
- id: 14
type: string
name: option
mapping:
- dps_val: charge_now
value: immediate
- dps_val: charge_pct
value: charge_to_percent
- dps_val: charge_energy
value: fixed_charge
- dps_val: charge_schedule
value: scheduled_charge
- entity: sensor
name: Connection state
class: enum
icon: "mdi:ev-plug-type2"
category: diagnostic
dps:
- id: 13
type: string
optional: true
name: sensor
mapping:
- dps_val: controlpi_12v
value: Standby
- dps_val: controlpi_12v_pwm
value: Communication initialising
- dps_val: controlpi_9v
value: Vehicle detected
- dps_val: controlpi_9v_pwm
value: Vehicle connected
- dps_val: controlpi_6v
value: Charging
- dps_val: controlpi_6v_pwm
value: Charging (ventilation)
- dps_val: controlpi_error
value: Pilot error
- entity: sensor
name: Energy
class: energy
dps:
- id: 1
type: integer
optional: true
name: sensor
unit: kWh
class: total_increasing
mapping:
- scale: 100
- entity: sensor
name: Session energy
class: energy
dps:
- id: 25
type: integer
optional: true
name: sensor
unit: kWh
class: total_increasing
mapping:
- scale: 100
- entity: sensor
name: Temperature
class: temperature
category: diagnostic
dps:
- id: 24
type: integer
optional: true
name: sensor
unit: "C"
- entity: sensor
name: Charge record
category: diagnostic
icon: "mdi:identifier"
dps:
- id: 22
type: string
optional: true
name: sensor
- entity: sensor
name: Voltage
class: voltage
dps:
- id: 6
type: base64
optional: true
name: sensor
unit: V
mask: "FFFF000000000000"
class: measurement
mapping:
- scale: 10
- entity: sensor
name: Current
class: current
dps:
- id: 6
type: base64
optional: true
name: sensor
unit: A
mask: "0000FFFFFF000000"
class: measurement
mapping:
- scale: 1000
- entity: sensor
name: Power
class: power
dps:
- id: 6
type: base64
optional: true
name: sensor
unit: W
mask: "0000000000FFFFFF"
class: measurement
- entity: binary_sensor
name: Fault
class: problem
category: diagnostic
dps:
- id: 28
type: bitfield
optional: true
name: sensor
mapping:
- dps_val: 0
value: false
- value: true
- id: 28
type: bitfield
optional: true
name: fault_code
Tuya Local will sign in to your Smart Life account just long enough to fetch the charger’s device ID and local key, then scan your LAN to find it. If it’s your first time using Tuya Local, then it will ask for your User code.
The user code is found it the Tuya App,
Click Me
Gear icon top right
Account and security
Near the bottom is the user code.




That’s it. Your Smart Life credentials are only used during this one-time fetch. After the device is added, Tuya Local talks to it purely over your LAN — your phone, the Smart Life app, and the Tuya cloud are no longer in the loop.
Go to Settings → Devices & services → Tuya Local → EV charger. You should see a device card containing:
Even with no vehicle plugged in, the Voltage sensor should immediately show a realistic mains reading (somewhere in the 220–245 V range depending on your country). That’s your fastest confirmation that the local link and Phase A decoding are both working.
Plug a vehicle in and you should see Connection state move through “Vehicle detected” and then “Charging” once the handshake completes, with Current and Power rising to match the slider setting.
If the cloud-assisted flow doesn’t work for you — for example because Smart Life sign-in keeps failing, your account is in a region that the Tuya Local list doesn’t expose, or the device doesn’t appear in the account list — you can fall back to the manual route below. You only need this if Step 4 didn’t work.
Treat the local key like a password. Anyone with the key and the charger’s IP could control it on your network.
The cloud-assisted flow can’t log in. Triple-check the data centre region you picked — Smart Life accounts are pinned to one region and you must select the same one. If you’re in New Zealand, Australia or much of South-East Asia your account is typically on the Western America centre; in the UK and EU, Western Europe; in mainland China, China; in India, India; in eastern North America, Eastern America. If you’re sure on region and password but it still fails, try the manual fallback above.
The device list is empty after cloud sign-in. The Smart Life account you signed into doesn’t have any devices linked to it. Make sure you logged in with the same account you used to pair the charger in Step 1, not a fresh one.
Tuya Local can’t reach the charger locally. Confirm the IP, try a lower protocol version (3.4 / 3.3 / Auto), and make sure no other app is holding the device’s single local connection slot — only one client at a time can talk to a Tuya device locally. That includes the Smart Life app actively talking to it on your phone, an old localtuya install, or another HA instance.
Device appears but only has 1–2 entities. The YAML wasn’t read. Confirm the file is in /homeassistant/custom_components/tuya_local/devices/, named with a .yaml extension, and that there are no parse errors (a tab character instead of spaces is a common culprit). Check Settings → System → Logs filtered on tuya_local. If you added the device before the YAML was in place, delete and re-add the device after fixing the file.
Voltage reads but Current and Power stay at 0. That’s the expected state when nothing is drawing — verify with a vehicle (or a known resistive load through the charger) before assuming anything is wrong. If they still stay at 0 with a load present, recheck the three mask hex strings in the YAML against the values above; a wrong nibble shifts the byte windows.
The slider won’t go above 10 A even though the YAML allows 16. Some hardware revisions are firmware-capped to a lower maximum even though the protocol can carry up to 16 A. The cap is set inside the charger itself, not by Home Assistant. If you have a 16 A unit and it’s clamping low, that’s a question for the supplier.
Energy stays at 0.00 kWh. Some firmware revisions only update the energy total at the end of a charging session, not continuously. Run a full charge and check again afterwards.
Now that the charger is in Home Assistant, the obvious wins are:
Build a dashbaord example below with built in charge timer.
