Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trailing whitespace in iOS Action Names are randomly added and uneditable #2753

Open
gravityrebel opened this issue Apr 30, 2024 · 0 comments

Comments

@gravityrebel
Copy link

gravityrebel commented Apr 30, 2024

iOS device model, version and app version

Model Name: iPhone 15 Pro
Software Version: 17.4.1
App version: 2024.624

Home Assistant Core Version
2024.4.4

Describe the bug
The iOS Companion App appears to be modifying the Name component of iOS action by adding trailing whitespace to actionName values sent to HA, which prevents automatons triggered by an actionName from running. Below is an example of an action received where there is trailing whitespace in actionName. This action was working correctly yesterday, as I had troubleshot the issue already once and manually repaired it on all devices.

event_type: ios.action_fired
data:
  actionID: [removed]
  actionName: "Unlock Door "
  sourceDeviceID: [removed]
  sourceDeviceName: [removed]
  sourceDevicePermanentID: [removed]
  triggerSource: appShortcut
origin: REMOTE
time_fired: "2024-04-30T18:41:06.754301+00:00"
context:
  id: [removed]
  parent_id: null
  user_id: [removed]

The issue is fixable if you go into the Companion App, delete the name fully and add new text such as a single letter, save it, and then go back again to modify the name a second time. The whitespace should now be accessible in a new location, normally as a leading whitespace instead of a trailing one. After following this procedure the action works again, though quotes are also no longer present in the name:

event_type: ios.action_fired
data:
  actionID: [removed]
  actionName: Unlock Door
  sourceDeviceID: [removed]
  sourceDeviceName: [removed]
  sourceDevicePermanentID: [removed]
  triggerSource: appShortcut
origin: REMOTE
time_fired: "2024-04-30T19:12:14.415461+00:00"
context:
  id: [removed]
  parent_id: null
  user_id: [removed]

To Reproduce
The issue can be forced to be reproduced quite easily, but the forced reproduction doesn't explain all scenarios of how it can arise.
Forced Reproduction Methods

  1. Create an iOS Action in the Companion App and provide it a name. Add a space after the name. The space will be entered as a valid character but will not appear visually in the name field and you will not be able to remove it without following the procedure listed above.
  2. Create an iOS Action in the Companion App and provide it a name, but use AutoComplete for the final word. The same situation will arise as Forced Method add more linked files #1.

Otherwise, you can try what has happened to me:
Create an automation keyed off an actionName and not an actionID, create an iOS action that has the same name, and wait a few days. The action will stop triggering and a trailing space will be present in the actionName being sent to HA.

Expected behavior

  1. No trailing spaces sent in actionName
  2. Trailing spaces are not automatically inserted into the Name field for Actions in the iOS Companion App
  3. Trailing whitespace characters are visible and editable inside of the Companion App.

Screenshots

This is how it appears inside of the companion app:
IMG_0226
Note that there does not appear to be any whitespace in the highlighted section.

This is what it looks like after following the procedure I listed above, but note it looks exactly the same. However, the data being sent now omits a trailing whitespace.
IMG_0228

Additional context

This has occurred on at least two devices. Initially discovered the issue when actions failed to trigger on my partners device. Troubleshooting lead me to find it on mine as well and have had to correct it a few different times now.

actionName is important to me because it allows me to create a single automation with a single trigger that can work across devices. While I understand I can also use actionID, it is difficult to pull them off devices and requires more long term maintenance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant