14 Commits

Author SHA1 Message Date
Bruno Pantaleão Gonçalves
2211129131
Remove hiddenBy and disabledBy from HAAppEntity and DB (#4265) 2026-01-28 12:58:37 +01:00
Copilot
7647ddedd6
Abstract column migration logic into DatabaseTableProtocol for all tables (#4243)
## Summary

Table migration logic for adding new columns and removing obsolete
columns has been abstracted into `DatabaseTableProtocol` with a default
implementation. All 13 table implementations now conform to the extended
protocol and support automatic column migration.

**Protocol Changes:**
- Added `tableName: String` property requirement
- Added `definedColumns: [String]` property requirement  
- Added default `migrateColumns(database:)` implementation that handles
adding/removing columns

**Updated Tables:**
All tables now implement the protocol and support column migration:
- `HAppEntityTable`, `WatchConfigTable`, `CarPlayConfigTable`,
`AssistPipelinesTable`
- `AppEntityRegistryListForDisplayTable`, `AppEntityRegistryTable`,
`AppDeviceRegistryTable`
- `AppPanelTable`, `CustomWidgetTable`, `AppAreaTable`
- `HomeViewConfigurationTable`, `CameraListConfigurationTable`,
`AssistConfigurationTable`

**Column Enums:**
All column enums in `DatabaseTables` now conform to `CaseIterable` for
consistent migration support.

Relies on `ALTER TABLE ... DROP COLUMN` support (SQLite 3.35+, iOS 15+).

## Screenshots

N/A - Database internals only.

## Link to pull request in Documentation repository

N/A - No user-facing changes.

## Any other notes

The migration logic is now centralized in the protocol extension,
eliminating code duplication across table implementations. Each table
provides its `tableName` and `definedColumns`, and the shared
`migrateColumns(database:)` method handles the actual column
synchronization.

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



<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> In GRDB+Initialization.swift each tablet has a logic to create table
columns that may not exist when the user updates the app, update those
table creationg to also delete columns that are not defined in the
create method anymore


</details>



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

 Let Copilot coding agent [set things up for
you](https://github.com/home-assistant/iOS/issues/new?title=+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: bgoncal <5808343+bgoncal@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-22 14:03:48 +01:00
Bruno Pantaleão Gonçalves
9ee8ac4419
Add summaries and area context to native dashboard (#4221)
<!-- 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="1206" height="2622" alt="Simulator Screenshot - iPhone 17 -
2026-01-14 at 16 42 40"
src="https://github.com/user-attachments/assets/0e023ce2-f767-40a8-900f-1b1a00a127f5"
/>

## 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-14 16:39:46 +00:00
Bruno Pantaleão Gonçalves
6f577ebb6f
Add rooms layout option to native dashboard (#4220)
<!-- 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="2568" height="1688" alt="CleanShot 2026-01-14 at 14 45
37@2x"
src="https://github.com/user-attachments/assets/a1deb196-c51d-47e1-a2a3-15f6b82b697f"
/>

## 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-14 15:58:43 +01:00
Copilot
4f0b4ecdef
Add mute TTS setting for Assist - allow text-only responses (#4212) 2026-01-12 23:47:02 +01:00
Bruno Pantaleão Gonçalves
5ae4dfb563
Improve cameras list view (#4175)
<!-- 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="2756" height="1368" alt="CleanShot 2026-01-07 at 14 27
46@2x"
src="https://github.com/user-attachments/assets/092f6241-06b1-47b5-802f-468d22fa4473"
/>

## 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>
2026-01-07 13:58:09 +00:00
Bruno Pantaleão Gonçalves
eca93130f8
Fix database insert for Entity and Device registry (#4160)
<!-- 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. -->
2026-01-06 11:01:43 +00:00
Bruno Pantaleão Gonçalves
39be820fb9
Persist Entity and Device registry (#4157)
<!-- 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. -->
2026-01-06 04:00:08 +00:00
Copilot
8cdfb4f294
Experiment: Native HomeView/dashboard (#4142)
Basic implementation of a native dashboard - WIP

- [ ] Support more domains toggle action when tapping icon
  - [x] Light
  - [x] Cover
  - [x] Switch
- [ ] Create the equivalent of "more info dialog" for each domain
  - [x] Light
  - [x] Cover
  - [x] Switch
- [x] Add haptics
- [ ] Add more cards such as a camera card
- [ ] Find a way to display sensors information such as humidity and
temperature
- [ ] Allow customizing background
- [x] Allow opening the native dashboard from iOS controls
- [ ] Allow opening the native dashboard from Shortcuts
- [ ] Add an advanced option somewhere in settings that allow user to
see the native dashboard first instead of web UI
- [ ] Add error state
- [x] Add empty state
- [x] Add loading state
- [x] Allow reordering rooms
- [x] Allow reordering cards

<img width="1232" height="1158" alt="CleanShot 2026-01-05 at 16 19
59@2x"
src="https://github.com/user-attachments/assets/84ae8748-ec40-430c-a820-fcb6a88a6270"
/>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: bgoncal <5808343+bgoncal@users.noreply.github.com>
2026-01-05 22:38:09 +00:00
Bruno Pantaleão Gonçalves
3e82dd7aa7
Persist HA Areas in App database (#3942)
Introduces the AppArea model, its database table, and related query
utilities for managing Home Assistant areas and their entities. Updates
the database initialization and updater logic to support caching and
persisting areas per server, including migration and fetch helpers.

<!-- 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-11-07 12:57:07 +01:00
Bruno Pantaleão Gonçalves
7e334405c7
Add device class to app database (#3548)
<!-- 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. -->
2025-04-16 16:43:29 +02:00
Bruno Pantaleão Gonçalves
3b1903a23a
Improve database creation and usage avoiding recursive environment call before its init (#3455)
<!-- 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. -->
2025-02-24 16:11:17 +01: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
c028a943da
Added widget builder (#3354)
<!-- 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 -->
First iteration of the widget builder, user is able to choose what
entities to display, choose a display text for them, color customization
and "on tap" action.
## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->


https://github.com/user-attachments/assets/5949322a-a8df-4b3d-aaab-d4ba3853cc84


## 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. -->
2025-01-27 16:16:24 +01:00