Add set temperature, set brightness and lock commands - #5657
Merged
Conversation
Also answers to "HA", "Hass" and "Home", and takes the app name as a prefix, so "Home Assistant turn on the kitchen light" works.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
It directly edits non-English localized AppShortcuts.strings files (which are Lokalise-managed) and includes a user-visible fallback string issue that should be corrected before merge.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds additional Siri/App Shortcuts voice commands to the iOS Companion App’s App Intents extension, covering commonly requested controls (set thermostat temperature, set light brightness, and lock a lock) and expanding Siri’s ability to recognize the app name.
Changes:
- Add new App Intents + App Entities for thermostat temperature, light brightness, and locking.
- Expand the
HomeAssistantAppShortcutsphrases (including app-name-prefixed variants) and bump the shortcut-count test. - Add new localization keys / dialogs and a small refactor to entity subtitle context building.
File summaries
| File | Description |
|---|---|
| Tests/App/Utilities/SiriValueIntentsTests.swift | New tests for locks/temperature bounds/dialog text |
| Tests/App/Utilities/HomeAssistantAppShortcutsTests.swift | Updates expected shortcut count (6 → 9) |
| Sources/Shared/Resources/Swiftgen/Strings.swift | SwiftGen updates for new localized keys |
| Sources/Extensions/EntityProvider+Details.swift | Adds shared contextSubtitle(serverName:) helper |
| Sources/Extensions/AppIntents/Control/ThermostatAppEntityQuery.swift | Thermostat picker/query for App Intents |
| Sources/Extensions/AppIntents/Control/ThermostatAppEntity.swift | Thermostat App Entity model |
| Sources/Extensions/AppIntents/Control/SetTemperatureAppIntent.swift | New “set temperature” intent (7–35 bounded) |
| Sources/Extensions/AppIntents/Control/SetBrightnessAppIntent.swift | New “set brightness %” intent |
| Sources/Extensions/AppIntents/Control/LockEntityAppIntent.swift | New “lock” intent (no unlock) |
| Sources/Extensions/AppIntents/Control/LockAppEntityQuery.swift | Lock picker/query for App Intents |
| Sources/Extensions/AppIntents/Control/LockAppEntity.swift | Lock App Entity model |
| Sources/Extensions/AppIntents/Control/DimmableLightAppEntityQuery.swift | Light picker/query for brightness intent |
| Sources/Extensions/AppIntents/Control/DimmableLightAppEntity.swift | Light App Entity model for brightness intent |
| Sources/Extensions/AppIntents/Control/ControllableEntityAppEntity.swift | Refactors subtitle to shared helper |
| Sources/App/Utilities/AppShortcuts/HomeAssistantAppShortcuts.swift | Adds 3 new shortcuts + more phrases |
| Sources/App/Resources/en.lproj/Localizable.strings | Adds new intent/dialog localized strings |
| Sources/App/Resources/en.lproj/AppShortcuts.strings | Adds new shortcut phrase localizations |
| Sources/App/Resources/en-GB.lproj/AppShortcuts.strings | Updates phrase localization entries |
| Sources/App/Resources/bg.lproj/AppShortcuts.strings | Updates phrase localization entries |
| Sources/App/Resources/ca-ES.lproj/AppShortcuts.strings | Updates phrase localization entries |
| Sources/App/Resources/cs.lproj/AppShortcuts.strings | Updates phrase localization entries |
| Sources/App/Resources/cy-GB.lproj/AppShortcuts.strings | Updates phrase localization entries |
| Sources/App/Resources/da.lproj/AppShortcuts.strings | Updates phrase localization entries |
| Sources/App/Resources/de.lproj/AppShortcuts.strings | Updates phrase localization entries |
| Sources/App/Resources/el.lproj/AppShortcuts.strings | Updates phrase localization entries |
| Sources/App/Resources/es.lproj/AppShortcuts.strings | Updates phrase localization entries |
| Sources/App/Resources/es-ES.lproj/AppShortcuts.strings | Updates phrase localization entries |
| Sources/App/Resources/es-MX.lproj/AppShortcuts.strings | Updates phrase localization entries |
| Sources/App/Resources/et.lproj/AppShortcuts.strings | Updates phrase localization entries |
| Sources/App/Resources/fi.lproj/AppShortcuts.strings | Updates phrase localization entries |
| Sources/App/Resources/fr.lproj/AppShortcuts.strings | Updates phrase localization entries |
| Sources/App/Resources/he.lproj/AppShortcuts.strings | Updates phrase localization entries |
| Sources/App/Resources/hu.lproj/AppShortcuts.strings | Updates phrase localization entries |
| Sources/App/Resources/id.lproj/AppShortcuts.strings | Updates phrase localization entries |
| Sources/App/Resources/it.lproj/AppShortcuts.strings | Updates phrase localization entries |
| Sources/App/Resources/ja.lproj/AppShortcuts.strings | Updates phrase localization entries |
| Sources/App/Resources/ko-KR.lproj/AppShortcuts.strings | Updates phrase localization entries |
| Sources/App/Resources/ml.lproj/AppShortcuts.strings | Updates phrase localization entries |
| Sources/App/Resources/nb.lproj/AppShortcuts.strings | Updates phrase localization entries |
| Sources/App/Resources/nl.lproj/AppShortcuts.strings | Updates phrase localization entries |
| Sources/App/Resources/pl-PL.lproj/AppShortcuts.strings | Updates phrase localization entries |
| Sources/App/Resources/pt-BR.lproj/AppShortcuts.strings | Updates phrase localization entries |
| Sources/App/Resources/ru.lproj/AppShortcuts.strings | Updates phrase localization entries |
| Sources/App/Resources/sl.lproj/AppShortcuts.strings | Updates phrase localization entries |
| Sources/App/Resources/sv.lproj/AppShortcuts.strings | Updates phrase localization entries |
| Sources/App/Resources/tr.lproj/AppShortcuts.strings | Updates phrase localization entries |
| Sources/App/Resources/uk.lproj/AppShortcuts.strings | Updates phrase localization entries |
| Sources/App/Resources/vi.lproj/AppShortcuts.strings | Updates phrase localization entries |
| Sources/App/Resources/zh-Hans.lproj/AppShortcuts.strings | Updates phrase localization entries |
| Sources/App/Resources/zh-Hant.lproj/AppShortcuts.strings | Updates phrase localization entries |
| Sources/App/Resources/Info.plist | Adds Siri alternative app names (“HA”, “Hass”, “Home”) |
| HomeAssistant.xcodeproj/project.pbxproj | Adds new intent/entity source files to project |
Review details
- Files reviewed: 52/52 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…k name The type name showed as "DimmableLight" when the localized string was missing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AI Policy
Select exactly one option that describes AI usage in this contribution:
Summary
Follows #5652 with the commands people ask for that were still missing.
Nine of Apple's ten App Shortcut slots are used.
Screenshots
No new UI. The commands are spoken, and their results are the dialog Siri reads back.
Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#
Any other notes
A phrase can only interpolate a finite set of options, so the number can't be spoken in one breath: "Set a temperature in Home Assistant" works and Siri then asks for the value.
SetTemperatureAppIntenthard-codes its 7–35 range because App Intents requires a compile-time literal there. A test pins it toClimateControlState's defaults so the two can't drift apart.