16 Commits

Author SHA1 Message Date
Bruno Pantaleão Gonçalves
950b4d7a53
Use device class icons for CarPlay (#3549) 2025-04-17 01:33:54 +02:00
Bruno Pantaleão Gonçalves
4523db5b09
Add fallback icon to sensors widget (#3431)
<!-- 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-13 14:47:31 +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
Bruno Pantaleão Gonçalves
469838a4a1
Update Open page widget items limit and sensor capitalized state (#3278)
<!-- 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-16 19:48:30 +00:00
Bruno Pantaleão Gonçalves
b3b3bd6ee9
Use correct sensor precision in sensors widget (#3269)
<!-- 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 -->
Pending on: https://github.com/home-assistant/iOS/pull/3268

CC: @Penait1 

## 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-12 17:51:26 +00:00
Bruno Pantaleão Gonçalves
94fe0c568f
Add more domains for sensors widget (#3270)
<!-- 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 -->
CC: @Penait1 
## 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-12 18:08:11 +01:00
Penait1
966ab593b5
Change sensor widget placeholder (#3223)
<!-- 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 -->
Change placeholder because it is confusing (see
[32](https://github.com/home-assistant/iOS/issues/3213)).

I chose question marks since that is also used in the gauge widget
## Screenshots
![Screenshot 2024-12-02 at 18 25
14](https://github.com/user-attachments/assets/a9acf406-d167-406d-bac9-b629425a04a1)
2024-12-03 10:12:04 +01:00
Bruno Pantaleão Gonçalves
cc59047b46
Fix widget corner radius when size style compressed and preview them as tile card (#3211)
<!-- 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-28 12:06:02 +01:00
Bruno Pantaleão Gonçalves
19c3d6e6a6
Bump number of widgets allowed and refactor UI creation logic (#3207) 2024-11-28 04:43:17 +01:00
Penait1
0435970293
Add sensor widget sizes (#3187)
<!-- 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
Add bigger widget sizes for the sensors widget

## Screenshots
<img width="277" alt="Screenshot 2024-11-23 at 14 14 59"
src="https://github.com/user-attachments/assets/caef4acd-264a-4c61-9270-a4c43e2c07b4">
<img width="281" alt="Screenshot 2024-11-23 at 14 19 06"
src="https://github.com/user-attachments/assets/efcc6038-0d46-46f3-819d-50c3ddf82e83">
2024-11-26 11:39:01 +01:00
Penait1
e2d5acdaba
simplify for loop (#3177)
<!-- 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
Really small mr, I just came across it looking into the scripts widget.
I assume the for loop only returns when all sync operations are
finished, removing the need to manually check for it

The preview still seems to work fine when adding a widget
2024-11-20 11:04:34 +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
95afe7ab98
Reflect CarPlay config changes in realtime (#3149)
<!-- 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-12 13:55:57 +01:00
Penait1
c2cd22b884
Change sensor widget view (#3126) 2024-11-06 23:10:22 +01:00
Penait1
8159d3ff6c
Group by server, widget selection order (#3102)
## Summary
Fixed two issues mentioned in #3067;

Sensors in the suggested sensors view should be grouped by server now
The order of the selected sensors is now respected if they come from two
different servers

## Screenshots
![Screenshot 2024-10-27 at 08 06
20](https://github.com/user-attachments/assets/fe4ae23c-013d-49b1-a3dc-6fd12ae46bfb)

## Any other notes
The `for` loop bothers me, Swift feels a lot like Kotlin and a `map`
seems more appriopiate.
Because an async call happens in it I could not get `map` working that
is nice to read, let me know if there is a better option chatgpt gave me
this

```
let sensorValues = try await withThrowingTaskGroup(of: WidgetSensorsEntry.SensorData?.self) { group in
    for sensor in configuration.sensors ?? [] {
        group.addTask {
            guard let server = Current.servers.all.first(where: { $0.identifier.rawValue == sensor.serverId }) else {
                throw WidgetSensorsDataError.noServers
            }
            return try await fetchSensorData(for: sensor, server: server)
        }
    }

    return try await group.compactMap { $0 }
}
```
2024-10-28 09:49:49 +01:00
Penait1
23d49d81e2
Sensor State Widget (#3067) 2024-10-25 16:09:24 +02:00