Reka trzymajaca telefon z ekranem automatyzacji Tuya

Build a Tuya Automation That Blocks Charging During Set Hours - Full Guide

Jan Prószyński

An automation in the Tuya app (Smart Life) is the most reliable way to stop your AMPERE POINT charger from charging during certain hours - one that keeps working no matter when the car actually gets plugged in. This guide builds one from scratch: a rule that blocks charging between 19:00 and 22:00, step by step, with every screen along the way.

Looking for the simpler option instead? See Schedule vs. Automation: which one fits your case.

How an automation is built

Every automation in the Tuya app has the same three parts. Understanding them is all you need to build your own rules.

Element Meaning
If Condition (trigger) The event that fires the rule. The rule "sleeps" until this event happens.
Then Action What runs once the condition is met.
Precondition Time restriction The window in which the rule can fire at all: hours, days of the week. Outside it, the rule is inactive.

Precondition is not a trigger. This is a common misunderstanding. Setting a 19:00–22:00 range doesn't mean "do something at 19:00" - it means "only react while the clock is between 19:00 and 22:00." Without an event in the If section, nothing happens on its own.

What conditions the charger offers

After choosing the "When device status changes" trigger and selecting your charger, the app shows a list of parameters you can watch. The most useful one is Work State - the device's operating state.

State Meaning
Charger Free Idle, nothing plugged in
Charger Inserted Plug inserted into the car
Charger Wait Waiting to start
Charger Charging Charging in progress
Charger Pause Charging paused
Charge finished Charging complete
Free with fault Fault with no car connected
Charge with fault Fault during charging

Any of these states can be a trigger. The rule fires the moment the charger transitions into the chosen state - not while it stays in it.

Building the rule, step by step

We'll build a rule that stops charging if it starts between 19:00 and 22:00, Monday to Friday. The same path applies to any other rule - only the chosen values change.

  1. Create a new automation - Smart tab → Automation → Create. If you already have other rules, use the + button in the top right corner.
    Creating a new automation
  2. Choose the trigger type - the list has several types. "When device status changes" reacts to a device. Schedule fires at a set time - useful if you want to build a schedule in the form of a scene.
    Choosing the trigger type
  3. Select the device - "Select a single device" picks one charger. "Select multiple devices" lets one rule cover several chargers at once - useful with more than one charging point.
    Choosing single vs multiple devices
  4. Pick your charger from the list - the list shows every device on the account. Devices marked "Offline" are unavailable right now but can still be used in a rule.
    Device list
  5. Set the condition - choose Work State, then a specific state - here, Charger Charging. The rule fires the moment charging starts.
    Setting Work State - Charger Charging
  6. The condition now shows under If - after confirming, you're back on the scene screen. The condition is saved. You can add more conditions with the + button, choosing at the top whether all of them or any one must be met.
    Condition shown under If
  7. Add an action - tap + next to Then. Besides controlling a device, you can also run another scene, add a delay, or send a notification.
    Adding an action
  8. Pick the device to control - it can be a different device than the one in the condition; that's what gives scenes their power. Here we're controlling the same charger, so we select it again.
    Choosing the device to control
  9. Pick the charger - the same device list as before.
    Device list for the action
  10. Set the parameter to change - Switch turns charging on or off. Also available: Charge Current Set (limits the current) and Work Mode - so instead of stopping charging, you could just reduce the current.
    Setting Switch to off
  11. Check the whole rule - the screen shows the condition, the action, and the Precondition entry, set to "All day" by default. Without changing it, the rule would run around the clock.
    Complete rule overview
  12. Open the time restriction - tap Precondition, then Effective Period. "Valid When" lets you additionally make the rule depend on other devices' state or on the weather.
    Opening the Precondition
  13. Choose Custom mode - besides manual, there are Day and Night modes based on sunrise/sunset - handy for things like lighting. For fixed hours, choose Custom.
    Choosing Custom mode
  14. Open the hour picker - after selecting Custom mode, an Effective Period entry appears, defaulting to 00:00–23:59.
    Opening the hour range picker
  15. Set the hour range - it's worth starting the range a few minutes earlier than the exact boundary hour, so the rule starts watching before the schedule sends its own command.
    Setting the hour range
  16. Set the days of the week and city - repeat this for the day selector. The app needs the city to correctly calculate local time and sunrise/sunset hours.
    Setting days of the week and city
  17. Pick the city on the map - zoom into your area and confirm with OK.
    Picking the city on the map
  18. Close the settings - the chosen range now shows next to the Effective Period entry. Tap Done.
    Closing the Precondition settings
  19. Name the rule - a good name includes the hours and what the rule does. With several rules in place, this saves a lot of time - you can see everything from the list without opening each one.
    Naming the automation
  20. Check that it's active - the rule appears on the list with a toggle. Green means active. You can turn a rule off at any time without deleting it - handy while you're on holiday, for instance.
    Active rule on the list

Rules worth remembering

Mistake Effect, and how to avoid it
No days selected in a schedule The entry runs once and then stops. Always set repeat.
Expecting an automation to turn the device on A rule that reacts to charging starting can only stop it. Turning it back on after the blocked window needs a schedule.
A rule with no time restriction It fires at any time of day. Set the Precondition.
Wrong device time zone All hours shift by a few hours. Check it in the device settings.

Schedule or automation - quick reference

Need Tool
Start charging at a fixed time Schedule
Stop charging at a fixed time Schedule
Block charging in given hours, regardless of plug-in time Automation with the Charger Charging condition
Reduce current instead of stopping Automation with the Charge Current Set action
Get notified about a fault Automation with the Charge with fault condition and Send notification action
Control several chargers at once Automation with Select multiple devices

Internet connection: a schedule is stored on the device itself and, once saved, keeps working without internet. Automations run in the cloud and need a connection. After a longer power outage, the device may need to resync with the app to restore its saved hours.

The most reliable setup: if charging hours need to be completely dependable, it's worth setting a schedule in the car itself too. The vehicle then won't draw power outside the set hours regardless of the app, the charger, or the internet connection.

Have a question about a specific step? Get in touch: hello@amperepoint.com.

Back to blog