home-assistant / home-assistant/iOS
Automatic sensor updates are sent only to the second server in a multi-server setup
- Dominant language
- Swift
- Stars
- 2.4k
- Forks
- 520
- Avg merge
- 7h 27m
- Merged PRs (30d)
- 264
Description
### Description
In a Home Assistant Companion App configuration with two Home Assistant
servers, automatic/signalled sensor updates are not sent to the server at the
top of the server list.
The server in position 2 receives automatic sensor updates normally.
Swapping the order of the servers moves the problem:
- Server in position 1/default: does not receive automatic sensor updates
- Server in position 2: receives automatic sensor updates
- After swapping the order, the previously working server stops receiving
automatic updates, and the other server starts receiving them
Manual sensor updates using the Home Assistant "Update Sensors" action in
Apple Shortcuts update both servers correctly.
This makes the issue fully reproducible and appears to be related to server
ordering rather than connectivity or either Home Assistant instance.
### Steps to reproduce
1. Configure two Home Assistant servers in the iOS Companion App.
2. Set "Sensors Sent" to "All" for both servers.
3. Put Server A first in the server list, making it the default server.
4. Put Server B second.
5. Toggle iOS Focus mode, for example enable Sleep Focus.
6. Wait approximately 30–60 seconds.
7. Observe that Server B receives the Focus sensor update, but Server A does not.
8. Swap the order of Server A and Server B in the Companion App.
9. Toggle Focus mode again.
10. Observe that Server A now receives the update, while Server B does not.
11. Run the Home Assistant "Update Sensors" action from Apple Shortcuts.
12. Observe that both servers update immediately.
### Expected behavior
All servers configured with "Sensors Sent: All" should receive automatic and
signalled sensor updates, regardless of their position in the server list.
### Actual behavior
Only the server in position 2 receives automatic/signalled sensor updates.
The server in position 1 is skipped.
Manual updates using the Shortcuts "Update Sensors" action work for both
servers.
### Tests already performed
- Confirmed both servers receive manual updates using the Update Sensors shortcut.
- Confirmed the problem follows the server-list position, not the server itself.
- Swapped the server order multiple times.
- Restarted the iPhone.
- Disabled sensor sending for one server and tested the other.
- Toggled "Sensors Sent" between None and All.
- Tested with the app open in the foreground.
- Tested using Sleep Focus as a signalled sensor change.
- Confirmed both server webhook endpoints accept sensor updates successfully.
- Tested direct internal Home Assistant access without the reverse proxy.
- Tested using the normal external URLs.
- Changing DNS and reverse-proxy routing does not affect the result.
### Environment
- Home Assistant Companion App: 2026.7.0, build 2026.2208
- iOS: 26.5
- Device: iPhone17,1
- Number of configured Home Assistant servers: 2
- Server1 Home Assistant Core: 2026.7.2
- Server2 Home Assistant Core: 2026.7.1
### Additional information
The debug log shows that automatic `update_sensor_states` webhook requests are
created for only one server. Which server receives them changes when the
server order is changed.
The server that is skipped can still receive:
- manual Update Sensors shortcut requests
- location webhook requests
- registration updates
- other webhook events
- authenticated WebSocket connections
This indicates that the server connection, webhook registration,
authentication, DNS, and Home Assistant backend are functioning correctly.
The issue appears limited to Companion App selection/routing of automatic
sensor updates in a multi-server configuration.
Contributor guide
Research direction
Use the reproduction steps and debug log as the starting point. Trace where automatic update_sensor_states webhook requests are created and how the server-list position is selected, then compare that path with the working manual Update Sensors shortcut path. Done means every configured server with “Sensors Sent: All” receives automatic updates regardless of ordering.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, swift
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100