home-assistant / home-assistant/iOS
Input_number/text value is not committed on iOS before calling a script
- Dominant language
- Swift
- Stars
- 2.4k
- Forks
- 520
- Avg merge
- 7h 27m
- Merged PRs (30d)
- 264
Description
Hi :)
I have a Home Assistant dashboard for recording a form.
I have one input_number helpers: input_number.number_field1
I use an entities card so that I can type the value directly, for example 60 number_field_1 rather than pressing + 60 times.
I also have a SAVE button that calls a script. The script reads the values from the two input_number entities.
The problem is platform-dependent:
**Desktop/browser:** everything works correctly.
**Home Assistant iOS app on iPhone:** if I type a value such as 60 and immediately press SAVE, the script receives the previous value instead of 60.
**Home Assistant iOS app on iPad:** same problem.
The issue appears to happen when the field is still focused/editing when I press the SAVE button.
For example:
1. number_field1 currently contains 0.
2. I tap the number_field1 field on the iPhone.
3. I type 60.
4. Without tapping elsewhere or explicitly confirming the field, I tap SAVE.
5. The script read 0 instead of 60.
6. If I first leave/confirm the field and then press SAVE, the correct value 60 is saved.
SCRIPT :
```
alias: SAVE
description: SAVE
mode: single
sequence:
- variables:
number_field1: '{{ states(''input_number.number_field1'') }}'
- data:
title: VALUE IS {{ number_field1 }}
message: '{{ number_field1 }}'
action: persistent_notification.create
- action: input_number.set_value
data:
value: 0
target:
entity_id: input_number.number_field1
```
LOVELACE
```
square: false
type: grid
cards:
- type: vertical-stack
cards:
- type: entities
show_header_toggle: false
entities:
- entity: input_number.number_field1
name: Number
icon: mdi:account-group
title: number_field1
- show_name: true
show_icon: true
type: button
name: SAVE
icon: mdi:content-save
show_state: false
tap_action:
action: call-service
service: script.save
icon_height: 50px
entity: input_number.number_field1
columns: 1
```
Is this a known limitation/bug with the Home Assistant iOS app or the iOS frontend while the numeric/text input is still focused ?
iPhone 17 Pro Max version 26.5.2
Home Assistant :
Installation method Home Assistant OS
Core 2026.9.1
Supervisor 2026.09.0
Operating System 18.2
Frontend 20260826.6
Companion app 2026.9.0 (2026.2874)
Thank you for your help :)
Contributor guide
Research direction
Reproduce the issue in the Home Assistant iOS app with the provided Lovelace entities card and SAVE button, comparing an immediately submitted edit with one that is first confirmed or unfocused. Trace the input commit and script-call behavior; done means the newly typed value is available to the script when SAVE is tapped immediately.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, swift
- Domain
- frontend, mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100