home-assistant / home-assistant/iOS

"Perform action" shortcut fails with "No server provided" on second device after iCloud sync, despite Server field showing "Home"

Open
#5,504 0 comments 1 reaction 0 assignees View on GitHub
bug ios
Dominant language
Swift
Stars
2.4k
Forks
520
Avg merge
7h 27m
Merged PRs (30d)
264

Description

**iOS device model, version and app version**
Model Name: iPhone 16
Software Version: 26.6
App version: 2026.7.5 (2026.2744)

**Home Assistant Core Version**
2026.8.3

**Describe the bug**
A Shortcut containing a Home Assistant "Perform action" step, created on one device (macOS) and synced to another (iPhone) via iCloud, fails on the second device with a "No server provided" error - even though every field in the action is populated correctly: Server displays "Home", Action displays "Turn on fan", and the action data is valid (`{"entity_id": "fan.probreeze"}`).

The failure is a contradiction between the displayed state and the resolved state. The Server field shows "Home" as the selected server, yet at runtime the action reports that no server is provided. Tapping "Show" on the error opens the shortcut editor with a red "No server provided" banner at the top while the Server row still reads "Home" (see screenshots).

The underlying server reference appears to be per-installation: the shortcut and its "Home" display label sync via iCloud, but the reference does not resolve on a device other than the one where it was selected.

Attempting to fix it on the second device creates an unresolvable loop: re-selecting the server on the iPhone clears the Action selection (Action appears to be scoped to the server), requiring the Action to be re-selected; and once the shortcut is corrected on the iPhone, the change syncs back via iCloud and the original macOS copy then fails in the same way. A single shortcut therefore cannot be made to work across both devices simultaneously.

**To Reproduce**
1. On macOS, create a Shortcut with a Home Assistant "Perform action" step. Set Server = Home, Action = "Turn on fan" (`fan.turn_on` — any action reproduces it), action data = `{"entity_id": "fan.probreeze"}`. Confirm it runs correctly on macOS.
2. Allow the Shortcut to sync to an iPhone via iCloud (same Apple ID; companion app installed and signed in to the same single server on both devices).
3. Run the Shortcut on the iPhone. → Fails with "No server provided", though the Server field shows "Home".
4. Tap "Show" on the error. → The editor opens with a red "No server provided" banner while the Server row still displays "Home".
5. On the iPhone, tap the Server row and re-select Home. → The Action selection is cleared and must be re-selected.
6. Once corrected on the iPhone, the change syncs back to macOS via iCloud. → The macOS copy now fails with the same error.

**Expected behavior**
A Shortcut created on one device and synced to another should resolve the selected server on any device where that server is registered and signed in - particularly in the single-server case, where resolution is unambiguous.

Failing that, the UI should not display "Home" as the selected server when that reference does not resolve on the current device. The displayed selection and the resolver disagree, which makes the action appear correctly configured while it cannot run — the field should show no selection (prompting re-selection) rather than a stale label that masks the unresolved reference.

**Screenshots**
Image
Image
Image

**Additional context**
* Second device is macOS: MacBook Air M2 (2022), macOS 26.5.1 (25F80), companion app version 2026.7.4. Note the app versions differ slightly between devices (iOS 2026.7.5 / macOS 2026.7.4).
* Both devices are signed in to the same single Home Assistant server ("Home") in the companion app.
* In some other instances the same underlying failure surfaced as a generic "unknown error occurred" dialog rather than the explicit "No server provided" text; the explicit form is shown in the attached screenshots.
* Happy to provide companion app logs on request.

Contributor guide

Open the contributing guide

Research direction

Reproduce the iCloud-synced Shortcut with a Home Assistant “Perform action” step on macOS and iPhone, then trace how the displayed Home server is resolved at runtime. Check the server and action selection state after sync and re-selection; done means the shortcut runs on both devices, or the UI clearly indicates when the server reference is unresolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, macos, swift
Domain
desktop-dev, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.