80 Commits

Author SHA1 Message Date
Bruno Pantaleão Gonçalves
6b3419ea23
Display dynamic island indication when db is updating (#4230)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->
<img width="1796" height="804" alt="CleanShot 2026-01-16 at 13 11 31@2x"
src="https://github.com/user-attachments/assets/4c0be252-f3b6-4ff5-b27e-8b11f19eaee4"
/>

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
2026-01-16 12:50:22 +00:00
Copilot
a7627d53aa
Fix Mac device identification on macOS Catalyst (#4108) 2025-12-18 02:28:53 +00:00
Copilot
9e8df8ad9d
Format BSSID MAC addresses with leading zeros for consistency with Android (#4095)
## Summary
BSSID sensor reported MAC addresses without leading zeros (e.g.,
`18:e8:29:a7:e9:b`), inconsistent with Android companion app and
standard MAC address notation. This breaks cross-platform room presence
tracking.

**Changes:**
- Added `String.formattedBSSID` extension that pads hex octets to 2
characters
- Applied formatting to BSSID sensor state in `ConnectivitySensor`
- Added test coverage for formatting edge cases

```swift
// Before: "18:e8:29:a7:e9:b"
// After:  "18:e8:29:a7:e9:0b"
sensor.State = bssid.formattedBSSID
```

## Screenshots
N/A - Sensor value formatting change only

## Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#

## Any other notes
**Breaking change:** Users with BSSID-based automations must update to
the new zero-padded format. This aligns iOS with Android, standard MAC
notation, and network management tools like UniFi.

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> 
> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>BSSID mac address format isn't consistant with Android
Companion app</issue_title>
> <issue_description>**iOS device model, version and app version**
> <!-- Please include your device 'Model Name' and 'Software Version' as
listed in iOS Settings>General>About. Please also give the app version
listed beneath "Home Assistant Companion" in the App Configuration>About
menu within the app, please include the number in brackets -->
> 
> Model Name: IPhone 6S
> Software Version: IOS 14.4.1
> App version: 2021.77
> 
> **Home Assistant Core Version**
> version | core-2021.3.4
> -- | --
> installation_type | Home Assistant Container
> dev | false
> hassio | false
> docker | true
> virtualenv | false
> python_version | 3.8.7
> os_name | Linux
> os_version | 5.3.18-3-pve
> arch | x86_64
> timezone | Europe/Paris
> 
> <details><summary>Home Assistant Community Store</summary>
> 
> GitHub API | ok
> -- | --
> Github API Calls Remaining | 4998
> Installed Version | 1.11.0
> Stage | running
> Available Repositories | 850
> Installed Repositories | 8
> 
> </details>
> 
> <details><summary>Home Assistant Cloud</summary>
> 
> logged_in | false
> -- | --
> can_reach_cert_server | ok
> can_reach_cloud_auth | ok
> can_reach_cloud | ok
> 
> </details>
> 
> <details><summary>Lovelace</summary>
> 
> dashboards | 9
> -- | --
> resources | 6
> views | 31
> mode | storage
> 
> </details>
> 
> **Describe the bug**
> The BSSID sensor reports access point mac address with leading zeros
omitted
> example:
> 
> ```
> 18:e8:29:a7:e9:b
> ```
> The last number is 0x0b
> 
> An adroid device connected the the same access point returns 
> 
> ```
> 18:e8:29:a7:e9:0b
> ```
> **To Reproduce**
> You need to have an access point with mac bytes lower then 0x10
> 
> **Expected behavior**
> Having same BSSID representation than reported by Android App
companion
> 
> **Screenshots**
> Iphone:
>
![image](https://user-images.githubusercontent.com/5980377/113318644-f3901d00-9310-11eb-94a8-63e53675946d.png)
> 
> Android phone
>
![image](https://user-images.githubusercontent.com/5980377/113318689-00ad0c00-9311-11eb-8594-8daa837dbb2a.png)
> 
> 
> **Additional context**
> I'm using BSSID to track room presence based on connected AP. I'm
trying to share BSSID --> access point for all household mobile.
> 
> I'd prefer the version with leading 0 witch is aligned with Unify
management tool.
> 
> </issue_description>
> 
> ## Comments on the Issue (you are @copilot in this section)
> 
> <comments>
> <comment_new><author>@zacwest</author><body>
> We're just slurping the value we read from the system, so we'd need to
sanitize the input to change it. It would also be a breaking change for
modifying what values are sent up, which is less-than-ideal since users
get auto-updated in the apps. I'm not sure there's a great path forward
for resolving this.</body></comment_new>
> </comments>
> 


</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes home-assistant/iOS#1563

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: bgoncal <5808343+bgoncal@users.noreply.github.com>
2025-12-16 12:38:06 +00:00
Bruno Pantaleão Gonçalves
2340cdf975
Add location and local access permission screens to onboarding (#3895) 2025-10-14 23:05:28 +02:00
Bruno Pantaleão Gonçalves
ca35a9a6ac
Stop observing disabled sensors triggers (#3721) 2025-07-14 23:08:37 +02:00
Bruno Pantaleão Gonçalves
64839bbac5
Move background task keys to enum and add tests (#3673)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-25 15:03:30 +02:00
Bruno Pantaleão Gonçalves
16f5a1bc75
Simplify and migrate onboarding screens to SwiftUI (#3527)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->



https://github.com/user-attachments/assets/e79c6e4d-13ff-405a-9463-02e597ce4996
2025-04-08 23:54:34 +02:00
Bruno Pantaleão Gonçalves
02e5fa6692
Save ClientEvents on local json file instead of GRDB to avoid crashes (#3378) 2025-01-30 12:55:32 +01:00
Bruno Pantaleão Gonçalves
87306eabbb
Rename iOS audio sensor values (#3237)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
2024-12-05 15:03:41 +01:00
Bruno Pantaleão Gonçalves
d7ba21107a
iOS Audio output sensor (#3161)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
2024-12-02 14:10:22 +01:00
Bruno Pantaleão Gonçalves
188904beb0
Migrate client events list to SwiftUI and GRDB for database (#3206) 2024-11-28 04:43:38 +01:00
Bruno Pantaleão Gonçalves
79d84045d6
Add more logging to connectivity errors (#3196)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
2024-11-26 14:06:57 +01:00
Bruno Pantaleão Gonçalves
13ac4e4a87
Making API connection optional given activeURL is now optional as well (#3169)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
2024-11-18 15:07:18 +01:00
Bruno Pantaleão Gonçalves
e823624661
Do not default to internal URL when external URL is not available (#2767)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

To avoid using internal URL out of local network, this PR makes
"activeURL" optional, and it will not use internalURL when out of local
network.

Tested the internal/external logic on:
- iPhone
- iPad
- Mac
- Watch
- Shortcuts
- Notifications
- Widgets

For VPN users, they have to set external URL the same as internal URL to
have their setup working.

Pending:
- [x] Verify all edge cases where "guard let" were added
- [ ] Enforce SSID to use internal URL in the App

Next possible iteration:
- Add noise protocol between app and server to make http connections
secure

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->
<img width="1154" alt="Screenshot 2024-05-13 at 11 46 47"
src="https://github.com/home-assistant/iOS/assets/5808343/7ea634cc-382b-49c2-ab64-a218f996452e">

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
2024-11-08 17:07:02 +01:00
Bruno Pantaleão Gonçalves
745355abcc
Fix watch sensors sync (#2966) 2024-09-02 12:31:37 +02:00
Joseph Chiocchi
a154389970
add charging state sensor for Apple Watch (#2945)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

Following the thread at
https://github.com/home-assistant/iOS/discussions/1764#discussioncomment-10434403
, this is my novice attempt at adding
https://developer.apple.com/documentation/watchkit/wkinterfacedevicebatterystate
or the Watch Battery State, using #2897 as a reference.

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->

I don't know how to take a screenshot of the sensor reporting through
the simulator, I can add them if pointed in the right direction.

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant# 

> _I will look into this. I will look for the corresponding watch
battery change docs if they exist and extend them._

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->

This is a rough pass. I used #2897 as a launching point - I read it
carefully as this is my first ever code contribution for Swift / iOS,
WatchOS project but I think I had enough heuristics to manage to
_possibly_ get it in the vicinity of it being correct.

I also used `Sources/Shared/API/Webhook/Sensors/BatterySensor.swift` for
including an additional `Battery State` sensor, while exposing both
sensors similarly in name like it's another device.

I think it could still be improved by using
`Sources/Shared/API/Webhook/Sensors/BatterySensor.swift` as a reference.
I tried to change as little as possible.

I wasn't sure if I needed to add anything to
`Sources/App/WatchCommunicatorService.swift`, considering the commit in
#2897,
f961d689e5 (diff-daa127042af3bc5719e4eb4e02e3c50bfcef50084f554e53475f4a4238fdd096)


- I will lean heavily on comments and will iterate where requested, if
the changes aren't edited directly by the maintainers. @bgoncal
- I **do** think I ran the Unit Tests correctly and added to the one
that was also changed in #2897

---------

Co-authored-by: Bruno Pantaleão Gonçalves <5808343+bgoncal@users.noreply.github.com>
2024-08-29 01:09:51 +02:00
Bruno Pantaleão Gonçalves
186aea4fa7
Create Watch Home from iOS (#2944)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

- Create watch home from iPhone
- Configure Assist for watch from iPhone
- Deprecate message for iOS Actions
- Use Scripts or Scenes directly
- Show/Hide Assist in Apple Watch
- Options to require confirmation before running watch item
(script/scene/action)

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->
![CleanShot 2024-08-27 at 15 52
39@2x](https://github.com/user-attachments/assets/5360c60d-9638-40b9-b799-d12668bd579f)


https://github.com/user-attachments/assets/1e4509f8-45e5-4b39-bfdc-62f9bce64617


## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
2024-08-28 09:45:07 +02:00
Bruno Pantaleão Gonçalves
f11c496833
Log event when retrying 503 webhook error (#2915)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
2024-08-13 14:33:15 +02:00
Bruno Pantaleão Gonçalves
0bcdd045c9
Retry with activeURL when cloud hook returns 503 (#2906)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
2024-08-13 13:58:02 +02:00
Bruno Pantaleão
d7a3930703 Revert "Use cloud hook only if cloud is enabled and set to be used"
This reverts commit c8df4b483faf8e9271a6730c7c890b8e9f120981.
2024-08-06 13:48:44 +02:00
Bruno Pantaleão
c8df4b483f Use cloud hook only if cloud is enabled and set to be used 2024-08-06 13:46:54 +02:00
Bruno Pantaleão Gonçalves
dd0e080a30
Use entity category "diagnostic" for App Version (#2899) 2024-08-02 12:48:18 +02:00
Bruno Pantaleão Gonçalves
4fa6de6b11
Add Apple Watch battery sensor (#2897)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
2024-08-02 11:32:24 +02:00
Bruno Pantaleão Gonçalves
7c05d32bfd
Add App version sensor (#2896)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
2024-08-02 11:13:38 +02:00
Bruno Pantaleão Gonçalves
38c90c1912
Add location permission sensor (#2892)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->
So you can finally know if that family member is not having their phone
tracked correctly because of the current location permission settings
and messing up with automations :D

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
2024-08-02 10:36:24 +02:00
Michal Šrůtek
3146e08aac
Available checks cleanup for iOS 15 and watchOS 8 (#2622)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

As the [minimum watchOS is
8](https://github.com/home-assistant/iOS/pull/2609) and [minimum iOS
15](https://github.com/home-assistant/iOS/pull/2469), this PR removes
redundant `#available` checks.

Co-authored-by: Bruno Pantaleão Gonçalves <bruno.ing879@gmail.com>
2024-03-04 15:36:55 +01:00
Michal Šrůtek
08781c19f0
Remove default options parameter (#2621)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->
This PR removes the `options` parameters which use the default value.

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->

<img width="1014" alt="Screenshot 2024-03-03 at 21 17 55"
src="https://github.com/home-assistant/iOS/assets/35694712/85324caf-c36d-4366-a9f8-9c349192a361">
<img width="1049" alt="Screenshot 2024-03-03 at 21 17 17"
src="https://github.com/home-assistant/iOS/assets/35694712/cebddbe6-8ea4-415e-b12a-0e35f86bf5a3">
<img width="1022" alt="Screenshot 2024-03-03 at 21 16 53"
src="https://github.com/home-assistant/iOS/assets/35694712/ccccb902-9791-42f6-8868-5900093c40ae">
<img width="991" alt="Screenshot 2024-03-03 at 21 16 28"
src="https://github.com/home-assistant/iOS/assets/35694712/f2f33685-a55c-47ed-a555-8cc0fc1561ce">
<img width="1329" alt="Screenshot 2024-03-03 at 21 16 00"
src="https://github.com/home-assistant/iOS/assets/35694712/2dc156da-29d6-44e4-a064-4fbdb79139bd">
<img width="1130" alt="Screenshot 2024-03-03 at 21 14 53"
src="https://github.com/home-assistant/iOS/assets/35694712/628dd2ff-5bba-4ee7-912b-cdbdf73f18b2">
2024-03-04 09:28:53 +01:00
mat1th
97834bfd5e
Update swift lint and format + appy fixes (#2585)
## Summary
Swift lint and swiftformat are outdated. This PR does update those +
applies the new formatting form swiftformat.
There is 1 swift file with a manual change:
`Sources/Vehicle/Templates/Areas/CarPlayAreasViewModel.swift`. This is
done because `swiftlint` did create the following swiftlint error:
`error: Cyclomatic Complexity Violation: Function should have complexity
10 or less; currently complexity is 11 (cyclomatic_complexity)`.

Because it does change a lot of files the question is if we want to
finetune the `swiftformat` rules.

## Screenshots
No user facing changes.

## Link to pull request in Documentation repository
NA

## Any other notes
NA
2024-02-22 13:06:39 +01:00
Bruno Pantaleão Gonçalves
e9c85b3f7a
Drop iOS 12, 13 and 14 support (#2469)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->
Drop support for iOS 12 and 13.

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
2023-12-27 16:50:11 +01:00
Bruno Pantaleão Gonçalves
e8598d913c
Wrap CoreMediaIO inside macCatalyst condition (#2452)
Apparently `#if canImport(CoreMediaIO)` is now true even if you are
trying to run the App on iOS instead of macOS, so this PR wraps it also
under `#if targetEnvironment(macCatalyst)`
2023-11-16 10:01:15 +01:00
Zac West
64e97ce44b
Bump MaterialDesignIcons to 7.0.96 (#2160) 2022-07-24 14:37:03 -07:00
Zac West
662eec4c64
Allow trusting otherwise-invalid TLS certificates during onboarding (#2131)
## Summary
During onboarding, allow trusting an invalid certificate chain for most features of the app.

## Screenshots
<img src="https://user-images.githubusercontent.com/74188/170773293-14eeb3fb-2e54-42a5-b6c6-8b07c792ea24.png" width="300">

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a corresponding pull request in the Companion App Documentation repository (https://github.com/home-assistant/companion.home-assistant). Please add the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
Future changes necessary:
- Trusting certificates if an error occurs while the app is running
- Trusting certificates when configuring internal/external URLs
2022-05-27 23:15:14 +00:00
Zac West
4c1854922e
Convert webhook secret to bytes from hex (#2095)
Refs home-assistant/core#67429.

## Summary
Fixes the logic for decryption to use the full key, rather than half of it, when decoding/encoding the additional encryption we use for webhooks only.

## Any other notes
This encryption is largely superfluous in the era of Let's Encrypt's dominance, but we're going to be reusing it for end-to-end encrypted notifications.
2022-03-06 10:18:16 -08:00
Zac West
60ac777069
Fix warnings in Xcode 13.3 (#2053) 2022-02-02 09:22:36 -08:00
Zac West
370fd18735
Server privacy setting for sensors (#2019)
## Summary
When set to "None", all sensors sent to the server will be redacted.

## Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#644

## Any other notes
This also updates location when changing location privacy & sensors when changing sensor privacy, so the data server-side will be most-up-to-date.
2021-12-20 23:15:40 -08:00
Zac West
e3d1d1c8ac
Setting for types of locations sent to a server (#2015)
Requires home-assistant/core#62243.

## Summary
Allows sending exact locations (current behavior, gps coordinates), no locations (sets the device tracker to 'unknown' effectively), and zone-only locations (we send `home`, `other_zone_name` or `not_home` only).

## Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#639
2021-12-20 15:13:11 -08:00
Zac West
546125dc0d
Add Audio Output sensors, rename Microphone to Audio Input (#1978)
Fixes #1958.

## Summary
Existing Core Audio stuff already exposes the output devices pretty easily, so creating sensors from 'em is pretty easy.

## Sensor Values
Roughly identical to microphones:

| Sensor | Attributes | Description |
| --------- | --------- | ----------- |
| `sensor.active_audio_input` | `All`, `Active` | The name of the active audio input (microphone), or `Inactive` if not in use. |
| `sensor.active_audio_output` | `All`, `Active` | The name of the active audio output (speaker), or `Inactive` if not in use. |
| `binary_sensor.audio_input_in_use` | None | Whether an audio output (microphone) on the system is currently in use. |
| `binary_sensor.audio_output_in_use` | None | Whether an audio output (speaker) on the system is currently in use. |

## Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#627

## Any other notes
This updates relatively instantly for when output starts, but takes a few seconds before it updates once output pauses.

Existing `microphone` sensors won't have their unique IDs changed, but their display name will change. New installs will get the new unique ID.
2021-12-07 09:18:32 -08:00
Zac West
d4324cc6d6
Fix cases of sending invalid sensor values on macOS (#1972)
- Stops caching of sensor values and now sends them to the server regardless if we think they have changed. Fixes #1473. The sensor container was (a) prone to issues (as it could not fully capture network semantics) and (b) not updated for multi-server support.
- Moves all intent handling that I can into the app for iOS 14+ / macOS 11+. The only intent that must be in the extension is the focus intent, which now strictly updates just the focus sensor on macOS, since it did not have access to all sensor values. Fixes #1921.
2021-12-05 10:00:47 -08:00
Zac West
5c104f76e9
Multi-server (#1906)
## Summary
Most, but not all, of the changes necessary to support multi-server throughout the app and all its features.

## Screenshots
| Light | Dark |
| ----- | ---- |
| ![Simulator Screen Shot - iPhone 13 Pro - 2021-11-26 at 21 52 24](https://user-images.githubusercontent.com/74188/143670011-9b9905ac-1b5b-4a82-b9f3-1490465c4ec5.png) | ![Simulator Screen Shot - iPhone 13 Pro - 2021-11-26 at 21 52 26](https://user-images.githubusercontent.com/74188/143670012-0080230a-8f68-4f34-9691-db9f5e825a83.png) |
| ![Simulator Screen Shot - iPhone 13 Pro - 2021-11-26 at 21 52 30](https://user-images.githubusercontent.com/74188/143670015-ceeac558-e039-4639-a186-b5001ab418b8.png) | ![Simulator Screen Shot - iPhone 13 Pro - 2021-11-26 at 21 52 29](https://user-images.githubusercontent.com/74188/143670016-d72bb69d-83f5-4197-a742-59d208467258.png) |
| ![Simulator Screen Shot - iPhone 13 Pro - 2021-11-26 at 21 52 47](https://user-images.githubusercontent.com/74188/143670021-6c90c40f-c2f1-4a33-aad9-da6626e99d9d.png) | ![Simulator Screen Shot - iPhone 13 Pro - 2021-11-26 at 21 52 45](https://user-images.githubusercontent.com/74188/143670024-e99de69d-61d8-4e12-be73-a172242806a0.png) |
| ![Simulator Screen Shot - iPhone 13 Pro - 2021-11-26 at 21 53 05](https://user-images.githubusercontent.com/74188/143670033-1a41ac7e-d4d1-458b-974e-2efdaf8e2288.png) | ![Simulator Screen Shot - iPhone 13 Pro - 2021-11-26 at 21 53 03](https://user-images.githubusercontent.com/74188/143670049-baf4db64-64db-4bfb-88cf-4930f9e5661b.png) |
| ![Simulator Screen Shot - iPhone 13 Pro - 2021-11-26 at 21 53 21](https://user-images.githubusercontent.com/74188/143670053-7ec794f1-857c-4ef6-a92a-5318e90ac6b6.png) | ![Simulator Screen Shot - iPhone 13 Pro - 2021-11-26 at 21 53 19](https://user-images.githubusercontent.com/74188/143670056-a6a5207c-3bba-49fc-b5c6-fc6fa8141f9c.png) |

## Any other notes
- Encapsulates all connectivity, token & server-specific knowledge in a Server model object which gets passed around.
- Updates various places throughout the app to know about and use Server rather than accessing said information through non-server-specific methods.
- Visually requests/notes server in places where it's ambiguous. For example, the Open Page widget will gain a subtitle if multiple servers are set up.
- Allows switching which server is shown in the WebViews. Note that this doesn't take into account multi-window support on iPad/macOS yet.

Most things will migrate successfully however adding an additional server causes things like Shortcuts to start erroring requiring you specify which to use in the particular Shortcut.

Future work necessary:
- Model objects currently clobber each other if their identifiers match. For example, both servers having a zone named `home` means one of them wins the fight for which is known to the app.
- Being remotely logged out on any account causes the app to require onboarding again, when instead it should only do that if the last known server is logged out.
2021-11-27 12:33:46 -08:00
Zac West
7cbde6ddb2
Try and fix Realm crashes via excessive background tasks (#1874)
Starting in iOS 15, there's a number of crashes happening in the background with Realm. They don't appear to be due to the file lock in the shared app container, but this may help resolve them either way -- easy to see if the next beta doesn't crash a bunch.
2021-10-03 21:28:00 +00:00
Zac West
8041b997b3
Only signal focus sensor updates in the foreground (#1859)
## Summary
Fixes unnecessarily doing a sensor update pass when launching in the background, as well as an occasional crash talking to UIApplication's applicationState off the main thread.

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include screenshots in light and dark mode. -->

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a corresponding pull request in the Companion App Documentation repository (https://github.com/home-assistant/companion.home-assistant). Please add the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull Request is part of a bigger change, please include it here. -->
2021-09-24 19:09:22 -07:00
Zac West
4a3007f0c2
Add live-updating to in-app display of focus sensor (#1845)
## Summary
Fires a sensor update pass if the app is running when the focus status changes.

## Any other notes
The focus sensor _always_ live-updates, but it does so in the Intents extension. This allows the Intents extension to inform the app that it did an update, which (unfortunately, for now) fires a sensor update pass in the app. So we're over-updating the sensors, but we're keeping the in-app sensor list updated. Worth the cost, I think, since the app running when focus changes happening feels rare unless the user's playing with the sensor.
2021-09-19 11:33:36 -07:00
Zac West
a8220f690e
Upgrade MaterialDesignIcons to 6.1.95 (#1844)
## Summary
- Upgrades the font, config, and adds a migration for renamed/removed icons.
- Migrates the one use of a renamed/removed one: `laptop-mac` -> `laptop`

## Any other notes
This change should also make it a little easier to do the migrations, since the Realm+Initialization part won't need to be touched, probably.
2021-09-19 10:36:57 -07:00
Zac West
293fae54cf
Fix focus sensor updating in iOS 15 RC (#1842)
## Summary
Fixes the insta-updating of the focus sensor on iOS 15.

## Any other notes
`INFocusStatusCenter.default.focusStatus` always returns isFocused=false in the extension, but the intent provides the correct focus status for each update -- so we need to cache this value in the extension, and not trust the focus center state.
2021-09-18 20:34:15 -07:00
Zac West
17fc1898f9
Fix crash updating active sensor idle time setting (#1803)
## Summary
Fixes a crash caused by infinitely recursing the value change.

## Any other notes
This also allows setting fractional minute values, every 15 seconds. The minimum timer which we check is 5 seconds, and that low means we won't detect changes if they occur in a 10 second period which feels too low.
2021-07-19 21:02:56 -07:00
Zac West
cd6fb39c6d
Add "Focus" sensor for iOS 15 & macOS 12 (#1664)
Refs #945. This will not be available until we switch to compiling builds with Xcode 13, regardless of when it is merged.

## Summary
Adds a "Focus" binary sensor which is on when focus is enabled. This updates live, even when the app isn't running, via Intents.

## Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#543

## Any other notes
Followup is needed for onboarding to prompt for this permission.
2021-06-18 12:45:09 -07:00
Zac West
90fa3ea022
Limit Sentry breadcrumbs to warning & reduce some logs (#1568)
* Limit Sentry breadcrumbs to warning level or above

* Reduce some logging
2021-04-03 11:56:11 -07:00
Zac West
da2574a3b5
Cache date formatter for frontmost app sensor (#1567)
Since we change the settings on the formatter, we end up paying initialization cost for each one, which adds up fast when command-tabbing.
2021-04-03 10:58:47 -07:00
Zac West
bcc007fdb9
Fix incorrectly cancelling ephemeral tasks (#1489)
Fixes regression in #1487.

## Summary
Ephemeral webhook sends do not have any persisted info on them, and that's to be expected.

## Any other notes
None.
2021-02-16 07:23:13 +00:00
Zac West
ae1d3ac4a0
Fix non-background-session webhook request replacement (#1487)
Fixes #1473. Again.

## Summary
When we issue webhook requests, we were failing to cancel any previous requests (which want to be cancelled) that were executed on not-the-background session. This moves to now checking both the background and non-background for cancellable requests.

## Any other notes
- Moves to explicitly cancelling, rather than silently replacing and succeeding, replaced requests. For example, a sensor update will now be explicitly cancelled if a new sensor update comes through, rather than following the success path.
- This resolves an issue where a sensor update occurs, fails on the non-background session, and retries with the same request data on the background session. This can lead to an older sensor update request, with outdated information, happening long after the most recent and correct one finishing.
2021-02-15 16:47:01 -08:00