Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
552c474
Fix setting _externalAccess (#12584)
ludeeus May 4, 2022
cf05fba
Fix enter key support for generic dialog box (#12600)
steverep May 6, 2022
ce77ddf
Revert #10991 (#12618)
zsarnett May 7, 2022
6c73ae5
Replace host-context with css properties
yosilevy May 7, 2022
6faa3eb
Remove "Lovelace" from Github issue templates (#12614)
spacegaier May 9, 2022
9ed069e
Get full core logs from core (#12639)
ludeeus May 9, 2022
ca37aff
Move YAML to first tab of Developer Tools (#12589)
zsarnett May 9, 2022
00c5d3d
Add configuration panel for Application Credentials (#12344)
allenporter May 9, 2022
8d3132f
Add label for Fix issue column header in statistics developer tools (…
Nardol May 9, 2022
b295bbd
RTL settings clickable list item fix (#12595)
yosilevy May 10, 2022
f09c842
Update src/state/translations-mixin.ts
yosilevy May 10, 2022
7db28c0
Update following review
yosilevy May 10, 2022
2e192d5
Update Translations to create helper (#12656)
zsarnett May 10, 2022
d89e433
Hide Cloud URL - Add Copy Icon (#12655)
zsarnett May 10, 2022
5ec7193
Show script traces in logbook (#12643)
bdraco May 10, 2022
7a9c2f5
Rtl menu fix (#12561)
yosilevy May 11, 2022
96d375c
Use /
bramkragten May 11, 2022
df94f4f
Merge branch 'dev' into RTL-no-host-context
bramkragten May 11, 2022
2040a49
Update var name
bramkragten May 11, 2022
a08a23a
Use FabBase
bramkragten May 11, 2022
f1b965d
Update ha-fab.ts
bramkragten May 11, 2022
c9c3be7
Merge pull request #12620 from yosilevy/RTL-no-host-context
yosilevy May 11, 2022
4c982b3
Switch logbook calls to use the new websocket (#12665)
bdraco May 12, 2022
72a36fb
Add calendar trigger offsets in automation editor (#12486)
allenporter May 12, 2022
6be6c71
Fix strict error handling in Markdown card templates (#12661)
frenck May 13, 2022
f36c915
Add missing label to search icon (#12671)
spacegaier May 13, 2022
09ee8db
Update Lokalise URL (#12684)
wrt54g May 15, 2022
01a5343
Teach logbook about additional context data (#12667)
bdraco May 16, 2022
3d66a68
Guard for missing backup integration (#12696)
ludeeus May 16, 2022
1bd760b
Rtl changes (#12693)
yosilevy May 16, 2022
ae2d48f
Return focus after dialogs close (#11999)
steverep May 16, 2022
ee0de94
Bumped version to 20220516.0
bramkragten May 16, 2022
b37f971
Fix float-end for LTR (#12707)
balloob May 17, 2022
ba27c18
Add my support for Application Credentials (#12709)
frenck May 17, 2022
6f67da0
Show manage cloud link to config (#12673)
zsarnett May 17, 2022
dd3a3ec
Add guard logic from PR home-assistant#12181 to input select row (#12…
breakthestatic May 17, 2022
90c234f
Refactor logbook data fetch logic into reusable class (#12701)
balloob May 17, 2022
c37e1f0
Add logbook to device info page (#12714)
balloob May 17, 2022
5fb1504
Add logbook to area info page (#12715)
balloob May 17, 2022
d32f84f
Add missing labels in energy dashboard settings (#12722)
Nardol May 18, 2022
4cfb671
Delete focus targets for replaced dialogs (#12724)
steverep May 18, 2022
f807618
Convert history calls to use new websocket endpoint (#12662)
bdraco May 18, 2022
7d1c77a
Add support for OAuth2 callback via My (#12718)
balloob May 18, 2022
af6b0d3
Support requesting translations for multiple integrations in one requ…
bdraco May 18, 2022
f4f51e1
Show the integration brand icon when there is no entity in logbook (#…
bdraco May 18, 2022
2796c35
Support requesting multiple integration manifests in a single request…
bdraco May 18, 2022
82035d5
Import all date-fns from modules (#12717)
balloob May 18, 2022
8216b52
Fix 'loading_log' string (#12712)
RoboMagus May 18, 2022
c41e100
Bumped version to 20220518.0
balloob May 18, 2022
6c48ace
Fix python to js timestamp conversions in logbook traces (#12677)
bdraco May 18, 2022
4486095
Update Material Design Icons to v6.7.96 (#12111)
mririgoyen May 19, 2022
6f19ea1
Various RTL fixes (#12721)
yosilevy May 19, 2022
f6411dc
Select + target picker Rtl fixes (#12711)
yosilevy May 19, 2022
788f76a
Add error handling for application credentials removal (#12686)
allenporter May 19, 2022
32a9919
Update zwave_js data collection URL (#12666)
raman325 May 19, 2022
5b7b0ea
Use device_id instead of config entry id and node id for zwave_js (#1…
raman325 May 19, 2022
1f105b6
Get attributes from first state when using minimal responses (#12732)
bdraco May 20, 2022
bfeb907
Pass device ID to logbook if available (#12728)
balloob May 20, 2022
a0a7ce0
Compute the icon based on the logbook state and not the current state…
bdraco May 20, 2022
6ab19d6
Add option to compare energy graphs with previous period (#12723)
bramkragten May 20, 2022
9a9eec4
Add an application credentials display name (#12720)
allenporter May 20, 2022
fae1bcf
Fixes logbook (#12740)
balloob May 20, 2022
8ac4a6d
Bumped version to 20220521.0
balloob May 21, 2022
51c5ab3
Stop closed event when selecting datadisk (#12749)
ludeeus May 23, 2022
da106d2
Use logbook livestream when requesting a time window that includes th…
bdraco May 23, 2022
0623e7d
Fetch supervisor info directly (#12751)
ludeeus May 23, 2022
1d5cc91
Remove kernel and agent versions from about page (#12750)
ludeeus May 23, 2022
7db6e0b
Move `preload_stream` setting to entity settings (#12730)
bramkragten May 23, 2022
a02b817
Use new localized context state and source in logbook (#12742)
bdraco May 23, 2022
067c2fd
Use new logbook streaming websocket api for cases where we need end_t…
bdraco May 23, 2022
e1fd724
Open Application Credentials from integration configuration flow (#12…
allenporter May 23, 2022
b71b230
Make entities and devices independent in the scene editor (#11046)
dmulcahey May 23, 2022
49c018c
Allow setting `device_class` "outlet" again through entity settings (…
spacegaier May 23, 2022
49cfde1
Bumped version to 20220523.0 (#12756)
zsarnett May 23, 2022
3acab5a
Adjust logbook stream consumer to handle new metadata (#12755)
bdraco May 24, 2022
36e1203
Adjust path to version info in issue template (#12760)
spacegaier May 24, 2022
e841bf8
Add My HA link to about page to Github issue template (#12761)
spacegaier May 24, 2022
2eaa246
RTL updates (#12745)
yosilevy May 24, 2022
8e4e22b
Add compare to energy sources table (#12762)
bramkragten May 24, 2022
536ea82
Fix (#12764)
yosilevy May 24, 2022
e3d394e
Change service_data to just data (#12628)
thomasloven May 24, 2022
e7517a8
Simplify OAuth2 authorize callback URL (#12765)
frenck May 24, 2022
3f1a252
Hide hidden media player entities in media panel (#12766)
balloob May 24, 2022
97663ae
Add integration filter to Device Selector (#12680)
zsarnett May 24, 2022
2dec8e7
Integration filter for Area Selector (#12682)
zsarnett May 24, 2022
7cc576a
Bump Version to 20220524.0 (#12769)
zsarnett May 25, 2022
966a624
Move zwave_js node comments from device config to info page (#12625)
raman325 May 25, 2022
d65e45e
Various RTL fixes
yosilevy May 25, 2022
d7971c6
Add controller statistics to zwave_js config dashboard (#12668)
raman325 May 25, 2022
e61aa26
Move Logbook and make device page better (#12763)
zsarnett May 25, 2022
f8303bf
Move metadata to pyproject.toml (#12770)
cdce8p May 25, 2022
b35ba4d
Add aria-haspopup to button menus (#12758)
steverep May 25, 2022
c4624fa
Hardware MVP (#12773)
zsarnett May 25, 2022
5217f5c
Fix "unavailable" handling for climate state rendering (#12778)
spacegaier May 25, 2022
19d0143
Ensure state is vertically centered in more-info (#12780)
spacegaier May 25, 2022
7358faf
Update zwave_js/network_status WS API (#12735)
raman325 May 25, 2022
85ad661
Bumped version to 20220525.0 (#12779)
zsarnett May 25, 2022
ffc4ca5
Use dynamic weather domain icon + icon alignment fix weather more-inf…
spacegaier May 25, 2022
2c1550b
Fix typo in credentials removal dialog (#12784)
spacegaier May 25, 2022
b0e6c41
Handle history api being passed entity ids as CSV (#12787)
bdraco May 25, 2022
d0ead1f
Fix history cache when there is cacheConfig (#12788)
bdraco May 26, 2022
10813d0
Use Hardware Integration for System Menu (#12789)
zsarnett May 26, 2022
c0d30c5
Fix Media Player More info cramped controls (#12790)
zsarnett May 26, 2022
3550a8c
Fix Switch as X unable to change to a new type (#12797)
zsarnett May 26, 2022
c9df93b
Fix Zwave Alerts on device page (#12785)
zsarnett May 26, 2022
00dceca
Set Error if entity is unavailable (#12791)
zsarnett May 26, 2022
73cf0b5
Dynamically determine the correct action config struct (#12798)
spacegaier May 26, 2022
6278eef
Remove import
yosilevy May 26, 2022
b7cdd9a
Merge pull request #12772 from yosilevy/RTL-switch
yosilevy May 26, 2022
6ec2e32
Hide Cloud information a bit more (#12802)
zsarnett May 26, 2022
abf7cb7
Add dynamic header/footer config determination and update struct (#12…
spacegaier May 26, 2022
f35af9e
Bump HAWS to 7.1.0 (#12804)
balloob May 26, 2022
41c61a2
Update Narrow Order on Device Page (#12801)
zsarnett May 26, 2022
a72fd19
Fix combo box inside dialog (#12805)
bramkragten May 26, 2022
6e58cd5
Bumped version to 20220526.0
bramkragten May 26, 2022
6797e17
Merge branch 'master' into dev
bramkragten May 26, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ DO NOT DELETE ANY TEXT from this template! Otherwise, your issue may be closed w
<!--
Provide details about the versions you are using, which helps us reproducing
and finding the issue quicker. Version information is found in the
Home Assistant frontend: Configuration -> Info.
Home Assistant frontend: Settings -> About.

Browser version and operating system is important! Please try to replicate
your issue in a different browser and be sure to include your findings.
Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Report a bug with the UI, Frontend or Lovelace
name: Report a bug with the UI / Dashboards
description: Report an issue related to the Home Assistant frontend.
labels: bug
body:
Expand All @@ -9,7 +9,7 @@ body:

If you have a feature or enhancement request for the frontend, please [start an discussion][fr] instead of creating an issue.

**Please not not report issues for custom Lovelace cards.**
**Please not not report issues for custom cards.**

[fr]: https://github.com/home-assistant/frontend/discussions
[releases]: https://github.com/home-assistant/home-assistant/releases
Expand Down Expand Up @@ -64,7 +64,7 @@ body:
label: What version of Home Assistant Core has the issue?
placeholder: core-
description: >
Can be found in the Configuration panel -> Info.
Can be found in: [Settings -> About](https://my.home-assistant.io/redirect/info/).
- type: input
attributes:
label: What was the last working version of Home Assistant Core?
Expand Down
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
blank_issues_enabled: false
contact_links:
- name: Request a feature for the UI, Frontend or Lovelace
- name: Request a feature for the UI / Dashboards
url: https://github.com/home-assistant/frontend/discussions/category_choices
about: Request an new feature for the Home Assistant frontend.
- name: Report a bug that is NOT related to the UI, Frontend or Lovelace
- name: Report a bug that is NOT related to the UI / Dashboards
url: https://github.com/home-assistant/core/issues
about: This is the issue tracker for our frontend. Please report other issues with the backend repository.
about: This is the issue tracker for our frontend. Please report other issues in the backend ("core") repository.
- name: Report incorrect or missing information on our website
url: https://github.com/home-assistant/home-assistant.io/issues
about: Our documentation has its own issue tracker. Please report issues with the website there.
- name: I have a question or need support
url: https://www.home-assistant.io/help
about: We use GitHub for tracking bugs, check our website for resources on getting help.
about: We use GitHub for tracking bugs. Check our website for resources on getting help.
- name: I'm unsure where to go
url: https://www.home-assistant.io/join-chat
about: If you are unsure where to go, then joining our chat is recommended; Just ask!
4 changes: 2 additions & 2 deletions build-scripts/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ module.exports = {
},
version() {
const version = fs
.readFileSync(path.resolve(paths.polymer_dir, "setup.cfg"), "utf8")
.match(/version\W+=\W(\d{8}\.\d)/);
.readFileSync(path.resolve(paths.polymer_dir, "pyproject.toml"), "utf8")
.match(/version\W+=\W"(\d{8}\.\d)"/);
if (!version) {
throw Error("Version not found");
}
Expand Down
2 changes: 1 addition & 1 deletion demo/src/configs/jimpower/lovelace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export const demoLovelaceJimpower: DemoConfig["lovelace"] = () => ({
type: "state-icon",
tap_action: {
action: "call-service",
service_data: {
data: {
entity_id: "group.downstairs_lights",
},
service: "homeassistant.toggle",
Expand Down
18 changes: 9 additions & 9 deletions demo/src/configs/teachingbirds/lovelace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ export const demoLovelaceTeachingbirds: DemoConfig["lovelace"] = () => ({
name: "AC bed",
tap_action: {
action: "call-service",
service_data: {
data: {
entity_id: "script.air_cleaner_quiet",
},
service: "script.turn_on",
Expand All @@ -390,7 +390,7 @@ export const demoLovelaceTeachingbirds: DemoConfig["lovelace"] = () => ({
name: "AC bed",
tap_action: {
action: "call-service",
service_data: {
data: {
entity_id: "script.air_cleaner_auto",
},
service: "script.turn_on",
Expand All @@ -403,7 +403,7 @@ export const demoLovelaceTeachingbirds: DemoConfig["lovelace"] = () => ({
name: "AC bed",
tap_action: {
action: "call-service",
service_data: {
data: {
entity_id: "script.air_cleaner_turbo",
},
service: "script.turn_on",
Expand All @@ -416,7 +416,7 @@ export const demoLovelaceTeachingbirds: DemoConfig["lovelace"] = () => ({
name: "AC",
tap_action: {
action: "call-service",
service_data: {
data: {
entity_id: "script.ac_off",
},
service: "script.turn_on",
Expand All @@ -429,7 +429,7 @@ export const demoLovelaceTeachingbirds: DemoConfig["lovelace"] = () => ({
name: "AC",
tap_action: {
action: "call-service",
service_data: {
data: {
entity_id: "script.ac_on",
},
service: "script.turn_on",
Expand Down Expand Up @@ -629,7 +629,7 @@ export const demoLovelaceTeachingbirds: DemoConfig["lovelace"] = () => ({
entity: "scene.morning_lights",
tap_action: {
action: "call-service",
service_data: {
data: {
entity_id: "scene.morning_lights",
},
service: "scene.turn_on",
Expand All @@ -641,7 +641,7 @@ export const demoLovelaceTeachingbirds: DemoConfig["lovelace"] = () => ({
entity: "scene.movie_time",
tap_action: {
action: "call-service",
service_data: {
data: {
entity_id: "scene.movie_time",
},
service: "scene.turn_on",
Expand Down Expand Up @@ -702,7 +702,7 @@ export const demoLovelaceTeachingbirds: DemoConfig["lovelace"] = () => ({
entity: "light.downstairs_lights",
tap_action: {
action: "call-service",
service_data: {
data: {
entity_id: "light.downstairs_lights",
},
service: "light.toggle",
Expand All @@ -714,7 +714,7 @@ export const demoLovelaceTeachingbirds: DemoConfig["lovelace"] = () => ({
entity: "light.upstairs_lights",
tap_action: {
action: "call-service",
service_data: {
data: {
entity_id: "light.upstairs_lights",
},
service: "light.toggle",
Expand Down
2 changes: 1 addition & 1 deletion demo/src/stubs/energy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { format, startOfToday, startOfTomorrow } from "date-fns";
import { format, startOfToday, startOfTomorrow } from "date-fns/esm";
import { EnergySolarForecasts } from "../../../src/data/energy";
import { MockHomeAssistant } from "../../../src/fake_data/provide_hass";

Expand Down
2 changes: 1 addition & 1 deletion demo/src/stubs/history.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
addMonths,
differenceInHours,
endOfDay,
} from "date-fns";
} from "date-fns/esm";
import { HassEntity } from "home-assistant-js-websocket";
import { StatisticValue } from "../../../src/data/history";
import { MockHomeAssistant } from "../../../src/fake_data/provide_hass";
Expand Down
18 changes: 9 additions & 9 deletions gallery/src/data/traces/basic_trace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export const basicTrace: DemoTrace = {
params: {
domain: "input_boolean",
service: "toggle",
service_data: {},
data: {},
target: {
entity_id: ["input_boolean.toggle_4"],
},
Expand Down Expand Up @@ -164,7 +164,7 @@ export const basicTrace: DemoTrace = {
params: {
domain: "input_boolean",
service: "toggle",
service_data: {},
data: {},
target: {
entity_id: ["input_boolean.toggle_2"],
},
Expand All @@ -182,7 +182,7 @@ export const basicTrace: DemoTrace = {
params: {
domain: "input_boolean",
service: "toggle",
service_data: {},
data: {},
target: {
entity_id: ["input_boolean.toggle_3"],
},
Expand All @@ -200,7 +200,7 @@ export const basicTrace: DemoTrace = {
params: {
domain: "input_boolean",
service: "toggle",
service_data: {},
data: {},
target: {
entity_id: ["input_boolean.toggle_4"],
},
Expand Down Expand Up @@ -298,11 +298,11 @@ export const basicTrace: DemoTrace = {
source: "state of input_boolean.toggle_1",
entity_id: "automation.toggle_toggles",
context_id: "6cfcae368e7b3686fad6c59e83ae76c9",
when: "2021-03-25T04:36:51.240832+00:00",
when: 1616647011.240832,
domain: "automation",
},
{
when: "2021-03-25T04:36:51.249828+00:00",
when: 1616647011.249828,
name: "Toggle 4",
state: "on",
entity_id: "input_boolean.toggle_4",
Expand All @@ -313,7 +313,7 @@ export const basicTrace: DemoTrace = {
context_name: "Ensure Party mode",
},
{
when: "2021-03-25T04:36:51.258947+00:00",
when: 1616647011.258947,
name: "Toggle 2",
state: "on",
entity_id: "input_boolean.toggle_2",
Expand All @@ -324,7 +324,7 @@ export const basicTrace: DemoTrace = {
context_name: "Ensure Party mode",
},
{
when: "2021-03-25T04:36:51.261806+00:00",
when: 1616647011.261806,
name: "Toggle 3",
state: "off",
entity_id: "input_boolean.toggle_3",
Expand All @@ -335,7 +335,7 @@ export const basicTrace: DemoTrace = {
context_name: "Ensure Party mode",
},
{
when: "2021-03-25T04:36:51.265246+00:00",
when: 1616647011.265246,
name: "Toggle 4",
state: "off",
entity_id: "input_boolean.toggle_4",
Expand Down
6 changes: 3 additions & 3 deletions gallery/src/data/traces/motion-light-trace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,11 @@ export const motionLightTrace: DemoTrace = {
"has been triggered by state of binary_sensor.pauluss_macbook_pro_camera_in_use",
source: "state of binary_sensor.pauluss_macbook_pro_camera_in_use",
entity_id: "automation.auto_elgato",
when: "2021-03-14T06:07:01.768492+00:00",
when: 1615702021.768492,
domain: "automation",
},
{
when: "2021-03-14T06:07:01.872187+00:00",
when: 1615702021.872187,
name: "Elgato Key Light Air",
state: "on",
entity_id: "light.elgato_key_light_air",
Expand All @@ -200,7 +200,7 @@ export const motionLightTrace: DemoTrace = {
context_name: "Auto Elgato",
},
{
when: "2021-03-14T06:07:53.284505+00:00",
when: 1615702073.284505,
name: "Elgato Key Light Air",
state: "off",
entity_id: "light.elgato_key_light_air",
Expand Down
2 changes: 1 addition & 1 deletion gallery/src/pages/lovelace/entities-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ const CONFIGS = [
name: Bed light
action_name: Toggle light
service: light.toggle
service_data:
data:
entity_id: light.bed_light
- type: section
label: Links
Expand Down
2 changes: 1 addition & 1 deletion gallery/src/pages/lovelace/glance-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ const CONFIGS = [
tap_action:
action: call-service
service: light.turn_on
service_data:
data:
entity_id: light.ceiling_lights
- entity: sun.sun
name: Regular
Expand Down
4 changes: 2 additions & 2 deletions gallery/src/pages/lovelace/picture-elements-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const CONFIGS = [
left: 90%
padding: 0px
service: light.turn_off
service_data:
data:
entity_id: group.all_lights
- type: icon
icon: mdi:cctv
Expand Down Expand Up @@ -88,7 +88,7 @@ const CONFIGS = [
left: 90%
padding: 0px
service: light.turn_off
service_data:
data:
entity_id: group.all_lights
- type: icon
icon: mdi:cctv
Expand Down
65 changes: 35 additions & 30 deletions hassio/src/addon-view/hassio-addon-dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ import {
HassioAddonDetails,
} from "../../../src/data/hassio/addon";
import { extractApiErrorMessage } from "../../../src/data/hassio/common";
import { setSupervisorOption } from "../../../src/data/hassio/supervisor";
import {
fetchHassioSupervisorInfo,
setSupervisorOption,
} from "../../../src/data/hassio/supervisor";
import { Supervisor } from "../../../src/data/supervisor/supervisor";
import { showConfirmationDialog } from "../../../src/dialogs/generic/show-dialog-box";
import "../../../src/layouts/hass-error-screen";
Expand Down Expand Up @@ -169,38 +172,40 @@ class HassioAddonDashboard extends LitElement {
if (this.route.path === "") {
const requestedAddon = extractSearchParam("addon");
const requestedAddonRepository = extractSearchParam("repository_url");
if (
requestedAddonRepository &&
!this.supervisor.supervisor.addons_repositories.find(
(repo) => repo === requestedAddonRepository
)
) {
if (requestedAddonRepository) {
const supervisorInfo = await fetchHassioSupervisorInfo(this.hass);
if (
!(await showConfirmationDialog(this, {
title: this.supervisor.localize("my.add_addon_repository_title"),
text: this.supervisor.localize(
"my.add_addon_repository_description",
{ addon: requestedAddon, repository: requestedAddonRepository }
),
confirmText: this.supervisor.localize("common.add"),
dismissText: this.supervisor.localize("common.cancel"),
}))
!supervisorInfo.addons_repositories.find(
(repo) => repo === requestedAddonRepository
)
) {
this._error = this.supervisor.localize(
"my.error_repository_not_found"
);
return;
}
if (
!(await showConfirmationDialog(this, {
title: this.supervisor.localize("my.add_addon_repository_title"),
text: this.supervisor.localize(
"my.add_addon_repository_description",
{ addon: requestedAddon, repository: requestedAddonRepository }
),
confirmText: this.supervisor.localize("common.add"),
dismissText: this.supervisor.localize("common.cancel"),
}))
) {
this._error = this.supervisor.localize(
"my.error_repository_not_found"
);
return;
}

try {
await setSupervisorOption(this.hass, {
addons_repositories: [
...this.supervisor.supervisor.addons_repositories,
requestedAddonRepository,
],
});
} catch (err: any) {
this._error = extractApiErrorMessage(err);
try {
await setSupervisorOption(this.hass, {
addons_repositories: [
...supervisorInfo.addons_repositories,
requestedAddonRepository,
],
});
} catch (err: any) {
this._error = extractApiErrorMessage(err);
}
}
}

Expand Down
Loading