Blog

12 Home Assistant scripts and scenes worth having on your Amazfit

A scene or a script turns one tap on your wrist into a whole routine in Home Assistant. These are twelve that fit most homes, with YAML you can paste, and where to put them on your Amazfit so they are always one tap away.

Published 20 min read

In this article
  1. The short answer
  2. What runs with one tap
    1. On the watch
    2. On the widget
  3. Script or scene
  4. Before you paste
  5. Twelve scripts and scenes
    1. 1. Good night
    2. 2. Leaving home
    3. 3. Welcome home
    4. 4. Open the garage, only if someone is home
    5. 5. Movie night
    6. 6. Start the vacuum
    7. 7. Heating boost for 30 minutes
    8. 8. Find my phone
    9. 9. Night light for 10 minutes
    10. 10. Quiet house
    11. 11. Water the garden for 10 minutes
    12. 12. Dinner is ready
  6. Where to put them on the watch
    1. In a room, or in Other
    2. Favorites
    3. Short names
    4. The widget’s four slots
  7. What not to put on one tap
  8. When a tap does nothing
    1. In Home Assistant
    2. On the watch
  9. Frequently asked questions

AmazHA, a Home Assistant app for Amazfit watches, gives every scene, script, button and automation a switch on its tile: one tap, and Home Assistant runs it. That makes the watch a natural place for the routines you start yourself, such as going to bed, leaving the house or warming up the living room, as long as Home Assistant has each one ready as a script or a scene.

This article explains what a tap on the watch sends to Home Assistant and how to choose between a script and a scene. Then come twelve recipes with YAML you can paste, where to put them on the watch, and what to check when a tap seems to do nothing.

The short answer

The routines that belong on the wrist are the ones you start yourself, at moments when the phone is not in your hand: good night, leaving home, welcome home, movie night, a heating boost, the vacuum, find my phone. Make each one a script or a scene in Home Assistant, switch it on under Devices in the AmazHA settings, and it appears on the watch with a switch that runs it at the first tap. Put the ones you use most in Favorites, or in the four slots of the widget on the watch face (Devices › Widget on watch), where a tap runs them without opening the app. Scenes, scripts, buttons and automations all work. Anything that waits or checks a condition should be a script.

What runs with one tap

Four kinds of Home Assistant entities run with one tap in AmazHA: scenes, scripts, buttons and automations. Buttons include both the button entities that devices provide, such as a restart or an identify button, and Home Assistant’s Button helper, input_button. In a room on the watch they are grouped under Scenes, Scripts, Automations and Buttons. Scenes come first in the room; the other three come after the controls, above the sensors.

On the watch

Each of these tiles has a switch on the right, like a light, but it behaves differently, because a scene or a script has nothing to keep on:

  • Tap the switch and the action runs at once. The switch lights up for under a second and springs back.
  • Tap the tile itself and its own screen opens: a large round button that says Tap to activate for a scene, Tap to run for a script or an automation, and Tap to press for a button. After a tap it shows Activated ✓, Started ✓, Triggered ✓ or Pressed ✓ for about two seconds, and a second tap in that time is ignored. The switch on the tile has no such pause: every tap runs the action again.
  • A running script reads Running… under its name instead of Script, on its tile and on its screen. Scenes, buttons and automations have no state to show.

With Vibrate on actions switched on in Preferences, every run gives a short tick. The Get around the watch tutorial shows the gestures.

Each tap sends one Home Assistant action:

On the watch What Home Assistant runs
A scene scene.turn_on
A script script.turn_on
A button button.press, or input_button.press for a Button helper
An automation automation.trigger, with the automation’s conditions skipped

Three things follow from that table:

  • The watch passes no values. A script starts without variables. Home Assistant uses a field’s default only in its own interface, not when the script runs, so a script with fields needs a fallback in each template, such as {{ minutes | default(10) }}.
  • An automation runs its actions and nothing else. It behaves as if you chose Run actions in Home Assistant: its conditions are skipped, and it runs even while it is turned off. Conditions inside its actions, in an if-then block for example, still apply. It also gets no trigger data, so a template that reads trigger.id comes back empty.
  • A script answers at once, an automation at the end. script.turn_on starts the script and returns. automation.trigger returns only when the automation’s actions have finished. From a tile that makes no visible difference. From the widget it does.

On the widget

The widget sits on the watch’s shortcut cards and holds up to four devices. A scene, a script, a button or an automation on it runs at the first tap, without opening AmazHA: the watch shows its name over a turning arc while the phone passes the call to Home Assistant, then goes back to the widget. If the call does not go through, the screen gives the reason, No answer from the phone or Home Assistant didn’t confirm it, with Retry and Open AmazHA below it. Retry never runs an action twice: if the first attempt reached Home Assistant after all, Retry reports it as done instead of starting it again.

The widget waits for Home Assistant’s answer, and the phone gives Home Assistant about 12 seconds. Scripts, scenes and buttons answer well within that. An automation answers only when its actions are done, so one with a delay or a wait ends on Home Assistant didn’t confirm it while it is in fact still running. Anything that takes time belongs in a script.

The widget’s header shows how old its states are, such as AmazHA · 1 min ago. The widget turns grey while the watch is offline or once its states are 12 hours old, and a tap on it then opens AmazHA instead of running anything.

Script or scene

Scene Script Automation
What it is A saved set of states, applied all at once A list of steps, run in order Steps that start by themselves on a trigger
Can wait, check or decide No Yes Yes
From the watch Sets its states Starts, and answers at once Runs its actions, conditions skipped
Good on the watch for How a room should look Routines with a delay, a condition or a message Rarely: a script fits better

A scene stores the states you want, such as two lights at 40 % and the blinds closed, and Home Assistant applies them together. It has no order, no waiting and no checks, and nothing to switch off afterwards: to go back, you activate another scene. A script is a list of steps that run one after the other. It can wait, check a condition, take one of two paths, send a notification and activate scenes along the way.

A simple test: if you can describe the routine as how the room should look, make it a scene. If the description contains a then, a wait or an only if, make it a script. Home Assistant’s own documentation recommends a script over an automation for steps you mainly start yourself, and on the watch a script also answers straight away.

Keep an automation only when its conditions must count. Create a Button helper (Settings › Devices & services › Helpers › Create helper › Button), make a change of its state the automation’s trigger, and put the helper on the watch. A tap presses the button, the button triggers the automation, and the automation checks its conditions as it normally would.

Before you paste

Each recipe is a script or a scene; one also comes with a short automation. To add them:

  • A script: Settings › Automations & scenes › Scripts › Create script › Create new script, then the three-dot menu, Edit in YAML. Replace what is there with the recipe and save.
  • A scene: Settings › Automations & scenes › Scenes › Create scene, then the three-dot menu, Edit in YAML. Paste and save. Home Assistant asks for a name and offers an Area: the room you pick is the room the scene appears in on the watch.
  • An automation: Settings › Automations & scenes › Create automation › Create new automation, then the three-dot menu, Edit in YAML.

Every entity id below is a placeholder: light.living_room, cover.garage_door, vacuum.robot and the rest. To find yours, search in Settings › Tools › States (Developer tools on versions before 2026.8), or build one step in the visual editor and switch to YAML to read the id it wrote. A few recipes use area ids: under Settings › Areas, labels & zones, the edit button on an area’s card shows its Area ID. notify.mobile_app_your_phone is the notification action of a phone running the Home Assistant Companion app; type “notify” in Settings › Tools › Actions to find yours.

The icon lines are for Home Assistant’s own screens. The watch draws one icon per kind of entity, the same for every script, which is why short names matter (more on that below).

Twelve scripts and scenes

1. Good night

It turns the downstairs lights off, locks the front door, lowers the heating and leaves a bedside light at 20 % for five minutes while you get into bed.

By the time you go to bed the phone is often on its charger. The watch is still on your wrist.

alias: Good night
icon: mdi:weather-night
sequence:
  - action: light.turn_off
    target:
      area_id:
        - living_room
        - kitchen
        - hallway
  - action: lock.lock
    target:
      entity_id: lock.front_door
    continue_on_error: true
  - action: climate.set_temperature
    target:
      entity_id: climate.living_room
    data:
      temperature: 18
  - action: light.turn_on
    target:
      entity_id: light.bedside
    data:
      brightness_pct: 20
  - delay:
      minutes: 5
  - action: light.turn_off
    target:
      entity_id: light.bedside
mode: single

continue_on_error: true on the lock step keeps the script going when the lock reports an error, so a jammed bolt does not stop it before the heating and the bedside light. With mode: single, a second tap during those five minutes does nothing.

2. Leaving home

It turns every light off, sets the thermostat to 17 °C, locks the front door and warns you if the back door is still open.

In many homes presence detection does this on its own, a few minutes after you leave. A tap on the way out does it now, and tells you about the back door before you are down the street.

alias: Leaving home
icon: mdi:home-export-outline
sequence:
  - action: light.turn_off
    target:
      entity_id: all
  - action: climate.set_temperature
    target:
      entity_id: climate.living_room
    data:
      temperature: 17
  - action: lock.lock
    target:
      entity_id: lock.front_door
    continue_on_error: true
  - if:
      - condition: state
        entity_id: binary_sensor.back_door
        state: "on"
    then:
      - action: notify.mobile_app_your_phone
        data:
          message: The back door is still open.
mode: single

entity_id: all reaches every light Home Assistant knows, the garden lights included. If some should stay on, list areas instead, as in the Good night script. A door or window contact is a binary_sensor whose state is on while it is open.

3. Welcome home

This scene turns on the hall and living room lights and sets the heating to 21 °C.

It is for the evening you come back earlier than usual, or for when the phone has not yet told Home Assistant that you are home.

name: Welcome home
icon: mdi:home-import-outline
entities:
  light.hallway:
    state: "on"
    brightness: 180
  light.living_room:
    state: "on"
    brightness: 150
  climate.living_room:
    state: heat
    temperature: 21

A thermostat in a scene takes its mode as the state (heat, cool, off) and its target as temperature. Light brightness in a scene goes from 0 to 255, not in percent: 180 is about 70 %.

4. Open the garage, only if someone is home

It opens the garage door when at least one person is at home, and otherwise sends a notification instead of opening it.

On the widget, a cover opens its own screen. Wrapped in a script, the garage is one tap from the watch face, which is exactly why it needs a condition: a stray tap on the bus must not open the garage of an empty house.

alias: Open the garage
icon: mdi:garage-open
sequence:
  - if:
      - condition: numeric_state
        entity_id: zone.home
        above: 0
    then:
      - action: cover.open_cover
        target:
          entity_id: cover.garage_door
    else:
      - action: notify.mobile_app_your_phone
        data:
          message: Nobody is home, so the garage stays closed.
mode: single

The state of zone.home is the number of people at home, so above: 0 means someone is there. To allow it only when you yourself are home, use a state condition on your person entity instead. If your gate is a button or a switch that pulses a relay, replace the action with button.press or switch.turn_on.

5. Movie night

This scene dims the living room lights, turns the kitchen light off and closes the blinds.

This is a scene in the strict sense: states and no steps. With the room dark and the film about to start, the watch is easier than a bright phone screen.

name: Movie night
icon: mdi:movie-open
entities:
  light.living_room:
    state: "on"
    brightness: 40
  light.kitchen:
    state: "off"
  cover.living_room_blinds:
    state: closed

Add your TV or receiver if Home Assistant can switch it on: a media_player in a scene takes state: "on" and, on many players, a source such as HDMI 1. To undo the scene, make a second one with the lights up and the blinds open, because a scene has no off.

6. Start the vacuum

It starts the robot vacuum, but only from its dock.

On the widget a vacuum opens its own screen; as a script it starts with one tap from the watch face. The condition keeps a tap from sending it out again while it is on its way back to charge.

alias: Start the vacuum
icon: mdi:robot-vacuum
sequence:
  - condition: state
    entity_id: vacuum.robot
    state: docked
  - action: vacuum.start
    target:
      entity_id: vacuum.robot
mode: single

vacuum.start works the same on every vacuum that can start. Cleaning one room does not. Current Home Assistant has a vacuum.clean_area action that takes a list of area ids in cleaning_area_id, for vacuums whose integration supports it once you have linked the map’s segments to your areas in the vacuum’s entity settings. Other integrations use vacuum.send_command with parameters of their own, or an action of their own, so check your integration’s documentation before you change the last step.

7. Heating boost for 30 minutes

It raises the thermostat to 23 °C for half an hour, then puts back the target it had before.

It is the boost button for a thermostat that does not have one, and the script remembers the old target so you do not have to.

alias: Heating boost
icon: mdi:radiator
sequence:
  - variables:
      before: "{{ state_attr('climate.living_room', 'temperature') }}"
  - condition: template
    value_template: "{{ before is number }}"
  - action: climate.set_temperature
    target:
      entity_id: climate.living_room
    data:
      temperature: 23
  - delay:
      minutes: 30
  - action: climate.set_temperature
    target:
      entity_id: climate.living_room
    data:
      temperature: "{{ before }}"
mode: single

The variables step reads the target before the boost. The condition stops the script when there is no single target to read, as on a thermostat set to a heat and cool range. A schedule that changes the target during the half hour is overwritten at the end. If Home Assistant restarts during the 30 minutes, the script stops and the boost stays, because a delay does not survive a restart. Some thermostats have a boost preset of their own (climate.set_preset_mode with preset_mode: boost); if yours does, use that instead.

8. Find my phone

It makes your phone ring, even when it is set to silent.

The tap reaches Home Assistant through the phone, over Bluetooth, so this works while the phone is within Bluetooth range of the watch, as a phone lost between the sofa cushions usually is.

Android and iPhone need different settings, both taken from the Companion app’s documentation. On Android, the alarm_stream channel plays the notification on the alarm stream, so the phone rings in vibrate and silent mode:

alias: Find my phone
icon: mdi:cellphone-sound
sequence:
  - action: notify.mobile_app_your_phone
    data:
      title: Find my phone
      message: Here I am.
      data:
        ttl: 0
        priority: high
        channel: alarm_stream
mode: single

On an iPhone, a critical alert plays its sound even when the phone is muted or in Do Not Disturb:

alias: Find my phone
icon: mdi:cellphone-sound
sequence:
  - action: notify.mobile_app_your_phone
    data:
      title: Find my phone
      message: Here I am.
      data:
        push:
          sound:
            name: default
            critical: 1
            volume: 1.0
mode: single

9. Night light for 10 minutes

It turns a light on at 10 % and off again ten minutes later.

It is for getting up in the night in a hallway with no motion sensor.

alias: Night light
icon: mdi:lightbulb-night
sequence:
  - action: light.turn_on
    target:
      entity_id: light.hallway
    data:
      brightness_pct: 10
  - delay:
      minutes: 10
  - action: light.turn_off
    target:
      entity_id: light.hallway
mode: restart

mode: restart makes a second tap start the ten minutes again. Use it with a light that is normally off at night: if it was on, the script dims it and then turns it off.

10. Quiet house

It pauses every media player that is playing.

Use it for a phone call or the doorbell, when the speakers are loud and the phone is in another room.

alias: Quiet house
icon: mdi:volume-off
sequence:
  - variables:
      playing: >-
        {{ states.media_player
           | selectattr('state', 'eq', 'playing')
           | map(attribute='entity_id') | list }}
  - condition: template
    value_template: "{{ playing | count > 0 }}"
  - action: media_player.media_pause
    target:
      entity_id: "{{ playing }}"
mode: single

The template picks only the players that are playing at that moment, so speakers that are off or idle are left alone, and the condition ends the script quietly when nothing is playing. To pause one room only, replace the template with that room’s players.

11. Water the garden for 10 minutes

It opens the garden water for ten minutes, then closes it.

You are in the garden and the phone is in the house.

alias: Water the garden
icon: mdi:sprinkler-variant
sequence:
  - action: switch.turn_on
    target:
      entity_id: switch.garden_water
  - delay:
      minutes: 10
  - action: switch.turn_off
    target:
      entity_id: switch.garden_water
mode: single

For a valve entity, use valve.open_valve and valve.close_valve instead. If Home Assistant restarts during the ten minutes, the script stops and the water stays on, for the same reason as the heating boost. This automation is the safety net: it turns the water off once it has been on for 15 minutes, and at every Home Assistant start.

alias: Garden water safety off
triggers:
  - trigger: state
    entity_id: switch.garden_water
    to: "on"
    for:
      minutes: 15
  - trigger: homeassistant
    event: start
conditions:
  - condition: state
    entity_id: switch.garden_water
    state: "on"
actions:
  - action: switch.turn_off
    target:
      entity_id: switch.garden_water
mode: single

If you sometimes water for longer by hand, raise the 15 minutes. If your valve or irrigation controller has an automatic shut-off of its own, set that as well.

12. Dinner is ready

It says “Dinner is ready” on the living room speaker.

The cook stays at the stove, and nobody has to shout up the stairs.

alias: Dinner is ready
icon: mdi:silverware-fork-knife
sequence:
  - action: tts.speak
    target:
      entity_id: tts.your_voice
    data:
      media_player_entity_id: media_player.living_room_speaker
      message: Dinner is ready.
mode: single

tts.speak needs a text-to-speech entity, such as the one Home Assistant Cloud provides or one from a speech integration; Settings › Tools › States lists yours under tts.. For more rooms, repeat the step for each speaker, or use a speaker group if your speakers support one.

Where to put them on the watch

In a room, or in Other

A new script or scene does not appear on the watch by itself. In the AmazHA settings (in the Zepp app: Profile › your watch › Apps › AmazHA › Settings), tap Devices › Refresh device list so the phone sees it, then open its room and switch it on. Every device starts hidden in AmazHA, scenes and scripts included. One with no area in Home Assistant is listed under Other, which has a Search box for long lists. Choose your devices, step 3 shows the switches, and step 4 the search.

Favorites

Favorites is an area you fill yourself, from any room, and it suits routines well. In Devices › Favorites, switch on Show on watch, then switch on the scripts and scenes you want, even ones you have not enabled in their room. Favorites appears first on the watch home, and unlike a room it keeps your order instead of grouping by kind: set it with Reorder favorites, and Good night can sit at the top. With Use Favorites as homepage, the watch opens straight onto that list, and only those devices are loaded. The Favorites & energy tutorial covers it from step 4.

Short names

Scripts tend to collect long names in Home Assistant, and on the watch every script has the same icon, so the name is what tells them apart. Give each one a short name for the watch: in Devices, tap the name of a device the watch shows and type a new one in Name on the watch, up to 32 characters. “Downstairs lights off and lock up” becomes “Night”. The watch uses the new name on every screen and on the widget, and Home Assistant keeps its own; Restore original name goes back to it. See Custom names & the widget, step 1.

The widget’s four slots

In Devices › Widget on watch, tap up to four devices. They appear in the order you pick them, left to right and top to bottom; with three, the third one takes the whole second row. The widget offers only devices the watch shows, so switch a script on in its room or make it a favorite first. With Use Favorites as homepage on, only favorites can go on it.

Then, on the watch, swipe right from the watch face to the shortcut cards, tap Edit and add AmazHA. Until you open AmazHA once, the widget says Open AmazHA. Changes you make on the phone reach the widget the next time you open the app. The steps are in Custom names & the widget, step 4.

The widget treats each kind differently: a light, a switch or a fan turns on or off, a scene, a script, a button or an automation runs, and anything else opens its own screen. A script is how you bring any other device down to one tap from the watch face: the vacuum (recipe 6), the heating boost (recipe 7), the garden water (recipe 11). It can also bring the wrong things down to one tap, which is the next section.

What not to put on one tap

AmazHA asks for a second step in two places, on purpose: unlocking a lock takes a second tap, Tap again to unlock, and disarming the alarm takes its code. Locking and arming take one tap. On the widget, a lock and an alarm panel open their own screens, so the same rules apply there.

A script runs at the first tap everywhere, and the widget works wherever your phone can reach Home Assistant. So:

  • Keep lock.unlock out of scripts you put on the watch. On the widget it would unlock your door with one touch of the watch face, from wherever you happen to be. Lock in scripts as often as you like, and unlock from the lock’s own screen.
  • Keep alarm_control_panel.alarm_disarm out of them too. The code would sit in the script, and the watch would no longer ask for it.
  • Give a garage or gate script a condition, as in recipe 4. A cover’s own screen opens it with one tap as well, but you reach that screen through its tile first; a script on the widget skips that step.
  • Run anything that must not happen twice from its own screen or the widget, not from the tile’s switch, which runs it again at every tap.

When a tap does nothing

The watch shows Started ✓, or flashes the switch, once it has sent the call. That says the call left the watch, not what Home Assistant did with it.

In Home Assistant

  1. Run it from Home Assistant. In Settings › Automations & scenes › Scripts, the three-dot menu on the script’s row has Run. If nothing happens there either, the problem is in the script, not in the watch.
  2. Read the trace. The same menu has Traces, a step-by-step record of each run: which steps ran, where a condition stopped it and which step failed. For an automation, the menu on its row in the automation list has Traces as well.
  3. Check whether it was already running. A script in single mode, the default, ignores a new start while it is still running, and Home Assistant writes Already running under Settings › System › Logs. A routine that should start over at every tap needs mode: restart.
  4. Check whether the scene ran. A scene’s state is the time it was last activated, so Settings › Tools › States tells you whether it ran. If it did and nothing moved, its devices were already in those states.
  5. Remember that an automation that is off still runs. From the watch, an automation runs even while it is turned off, with its conditions skipped. If that is not what you want, turn it into a script with a condition, or trigger it from a Button helper.
  6. Look for missing values. A template that reads a script field or trigger.id gets nothing when the watch starts it.
  7. Check the entity id. AmazHA knows each device by its entity id. If you change a script’s entity id in Home Assistant, switch it on again in Devices and pick it again for the widget.

On the watch

  • The switch is grey, or the screen says Unavailable. The watch has lost Home Assistant, and it sends nothing it cannot deliver. The banner on the home says why: Offline · No answer from the phone means the watch cannot reach the phone, Offline · Home Assistant unreachable means the phone cannot reach your server. When something’s wrong covers both, in step 2 and step 3.
  • The widget says No answer from the phone. The same cause. Tap Retry once the phone is close again.
  • The widget says Home Assistant didn’t confirm it. The phone reached Home Assistant, which refused the call or did not answer in time. An automation with a delay does this while it runs: make it a script.
  • The widget is grey. The watch is offline, or the widget’s states are 12 hours old or more, and a tap opens AmazHA instead of running anything. Opening the app brings it up to date.
  • The script is not on the watch. In the settings, tap Devices › Refresh device list, then switch it on in its room or in Other.

The complete guide to Home Assistant on an Amazfit covers every other device type, and the watch sensors article works the other way round, from the watch into Home Assistant.

Frequently asked questions

Does a scene or a script ask for confirmation on the watch?

No. It runs at the first tap: on the switch of its tile, on its own screen and on the widget. The watch asks twice only where a mistake costs something: unlocking a lock takes a second tap and disarming the alarm takes its code. Keep those two out of scripts, or the confirmation is gone.

Can I run a Home Assistant automation from my Amazfit?

Yes. Switch it on in Devices like any other device and tap it. The watch runs its actions the way Run actions does in Home Assistant: its conditions are skipped, and it runs even while the automation is turned off. For something you start by hand, a script is usually the better choice.

Does it work from the widget without opening AmazHA?

Yes. Put the scene or script in one of the widget’s four slots, under Devices › Widget on watch, and a tap on the watch face runs it through your phone and returns to the widget. When the widget is grey, because the watch is offline or its data is 12 hours old, a tap opens AmazHA instead.

Can I pass a value to a script from the watch?

No. The watch starts every script without variables, and Home Assistant does not apply a field’s default when a script runs, so give each template a fallback such as | default(21). To pick a value on the wrist, let the script read a Dropdown helper (input_select), which the watch can set with a tap.

Why does the watch say Started but nothing happens?

Started ✓ means the call left the watch and Home Assistant started the script, not that every step did something. Open the script’s Traces in Home Assistant to see where it ended: a condition that did not pass, a step that failed, or a second start ignored because the script was still running.

Why can’t I find my script on the watch?

Every device starts hidden in AmazHA, scripts and scenes included. Open Devices in the AmazHA settings, find it in its room, or in Other when it has no area, and switch it on. If it is not in the list at all, it was created after the last scan: tap Refresh device list.

How many scripts and scenes can I put on the watch?

They count as devices, and the watch takes up to 100 devices in all, with a few dozen keeping it fast. The widget on the watch face has four slots. Favorites is the place for the rest of your routines, in the order you choose.

Watch it on video

The short tutorials this article builds on, with every step written out.

All articles