7 Commits

Author SHA1 Message Date
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
David Beitey
7c052a9f1d
Update repo name and URL in CONTRIBUTING docs (#2210)
<!-- 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 clarifies in the contributing docs which project is being
contributed to and which repo to work against - previously it said just
"Home Assistant" which could be confusing.

This also updates the repo URL in the contributing docs and at the same
time several code comments that also used the older repo URL.

## 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. -->
2022-09-30 16:27:39 +00: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
5c132da07f
Add "Location History" to Settings (#1521)
## Summary
Hopefully improve debugging location issues by providing a visualization of what we know about a location update.

## Screenshots
<img width="350" src="https://user-images.githubusercontent.com/74188/110420951-5ca5ad00-8051-11eb-82d9-b81dc28e20b7.png"><img width="350" src="https://user-images.githubusercontent.com/74188/110420954-5dd6da00-8051-11eb-9d78-61783873b08a.png">
<img width="350" src="https://user-images.githubusercontent.com/74188/110420959-60393400-8051-11eb-906c-74e19096e274.png"><img width="350" src="https://user-images.githubusercontent.com/74188/110420961-616a6100-8051-11eb-9aee-334234a6c59c.png">
<img width="350" src="https://user-images.githubusercontent.com/74188/110420972-63ccbb00-8051-11eb-855c-4e7d41a4e16f.png"><img width="350" src="https://user-images.githubusercontent.com/74188/110420975-64fde800-8051-11eb-9876-c0cb0f682727.png">
<img width="350" src="https://user-images.githubusercontent.com/74188/110420986-692a0580-8051-11eb-976b-1e2be659bcae.png"><img width="350" src="https://user-images.githubusercontent.com/74188/110420988-6af3c900-8051-11eb-982c-aaa903f4af5d.png">

## Any other notes
- Shows a blue circle for zones, an orange circle for non-single-region zones' regions, a purple circle for location and its accuracy.
- Allows sharing a bunch of debug data about the location and region states.
- Allows clearing of location history.
2021-03-08 22:57:49 -08:00
Zac West
640cca884b
Add SwiftFormat to project (#1463)
Adds new fastlane lanes:
- `fastlane lint` which checks the linters
- `fastlane autocorrect` which applies the linters which can autocorrect (Rubocop, SwiftFormat)

Adds a build step to the Codegen abstract target which runs SwiftFormat in lint mode, pointing out what it's going to change when run.

Applies SwiftFormat to nearly all code -- exempts a few externally-sourced files and generated code.
2021-02-05 22:06:25 -08:00
Zac West
ee02799ac6
Allow Network Hardware Address to decide "internal" on Mac (#1370)
Fixes #1353.

## Summary
This allows you to use a docked ethernet adapter as the thing to decide whether you are currently internal. This will help hardware without Wi-Fi or with Wi-Fi disabled to use the feature.

## Screenshots
<img width="400" alt="Screen Shot 2021-01-12 at 20 26 28" src="https://user-images.githubusercontent.com/74188/104407176-df106580-5515-11eb-82a0-2b5d4eb23694.png"><img width="400" alt="Screen Shot 2021-01-12 at 20 26 23" src="https://user-images.githubusercontent.com/74188/104407181-e0da2900-5515-11eb-9c2c-773c725cb841.png">

## 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
- Removes some "is this internal?" dead code during onboarding. Probably worth doing the internal/external pull in at this point.
- Pulls some of the class method things on ConnectionInfo into the connectivity wrapper in Environment.
2021-01-12 21:18:37 -08:00
Zac West
4d9a530637
Reorganize files in repo, pull out build settings from pbxproj (#1140)
This is somewhat in prep of being able to make the project file generated, but also just organizes things into more concrete directory structures.

This pulls out _all_ of the build settings from the root level, and most from the target level, into xcconfigs.

The new directory structure looks like:

- Sources
  - App
    - (everything from HomeAssistant/)
  - WatchApp
  - Shared
  - MacBridge
  - Extensions
    - Intents
    - NotificationContent
    - NotificationService
    - Share
    - Today
    - Watch
    - Widgets
- Tests
  - App
  - UI
  - Shared

Somewhat intentionally, the file structure under these is not yet standardized/organized.

The project targets are now:

- App
- WatchApp
- Shared-iOS
- Shared-watchOS
- MacBridge
- Tests-App
- Tests-UI
- Tests-Shared
- Extension-Intents
- Extension-NotificationContent
- Extension-NotificationService
- Extension-Share
- Extension-Today
- Extension-Widget
- WatchExtension-Watch

This does not yet clean up resources vs. sources, nor does it handle some of the "it's in Sources/App but it's part of Shared" crossover directory issues.
2020-10-03 00:15:04 -07:00