Skip to content

Commit

Permalink
Merge branch 'home-assistant:dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
ildar170975 authored Jan 17, 2025
2 parents 8e1ca4a + 2105793 commit 266e28a
Show file tree
Hide file tree
Showing 769 changed files with 19,122 additions and 16,342 deletions.
3 changes: 1 addition & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.148.1/containers/python-3/.devcontainer/base.Dockerfile
FROM mcr.microsoft.com/devcontainers/python:3.12
FROM mcr.microsoft.com/devcontainers/python:1-3.13

ENV \
DEBIAN_FRONTEND=noninteractive \
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ body:
value: |
Make sure you are running the [latest version of Home Assistant][releases] before reporting an issue.
If you have a feature or enhancement request for the frontend, please [start an discussion][fr] instead of creating an issue.
If you have a feature or enhancement request for the frontend, please [start a discussion][fr] instead of creating an issue.
**Please do not report issues for custom cards.**
Expand Down Expand Up @@ -74,7 +74,7 @@ body:
If known, otherwise leave blank.
- type: input
attributes:
label: In which browser are you experiencing the issue with?
label: In which browser are you experiencing the issue?
placeholder: Google Chrome 88.0.4324.150
description: >
Provide the full name and don't forget to add the version!
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ blank_issues_enabled: false
contact_links:
- 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.
about: Request a new feature for the Home Assistant frontend.
- 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 in the backend ("core") repository.
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
env:
IS_TEST: "true"
- name: Upload bundle stats
uses: actions/upload-artifact@v4.5.0
uses: actions/upload-artifact@v4.6.0
with:
name: frontend-bundle-stats
path: build/stats/*.json
Expand All @@ -113,7 +113,7 @@ jobs:
env:
IS_TEST: "true"
- name: Upload bundle stats
uses: actions/upload-artifact@v4.5.0
uses: actions/upload-artifact@v4.6.0
with:
name: supervisor-bundle-stats
path: build/stats/*.json
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- cron: "0 1 * * *"

env:
PYTHON_VERSION: "3.12"
PYTHON_VERSION: "3.13"
NODE_OPTIONS: --max_old_space_size=6144

permissions:
Expand Down Expand Up @@ -57,14 +57,14 @@ jobs:
run: tar -czvf translations.tar.gz translations

- name: Upload build artifacts
uses: actions/upload-artifact@v4.5.0
uses: actions/upload-artifact@v4.6.0
with:
name: wheels
path: dist/home_assistant_frontend*.whl
if-no-files-found: error

- name: Upload translations
uses: actions/upload-artifact@v4.5.0
uses: actions/upload-artifact@v4.6.0
with:
name: translations
path: translations.tar.gz
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- published

env:
PYTHON_VERSION: "3.12"
PYTHON_VERSION: "3.13"
NODE_OPTIONS: --max_old_space_size=6144

# Set default workflow permissions
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
script/release
- name: Upload release assets
uses: softprops/action-gh-release@v2.1.0
uses: softprops/action-gh-release@v2.2.1
with:
files: |
dist/*.whl
Expand All @@ -76,7 +76,7 @@ jobs:
- name: Build wheels
uses: home-assistant/[email protected]
with:
abi: cp312
abi: cp313
tag: musllinux_1_2
arch: amd64
wheels-key: ${{ secrets.WHEELS_KEY }}
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
- name: Tar folder
run: tar -czf landing-page/home_assistant_frontend_landingpage-${{ github.event.release.tag_name }}.tar.gz -C landing-page/dist .
- name: Upload release asset
uses: softprops/action-gh-release@v2.1.0
uses: softprops/action-gh-release@v2.2.1
with:
files: landing-page/home_assistant_frontend_landingpage-${{ github.event.release.tag_name }}.tar.gz

Expand Down Expand Up @@ -136,6 +136,6 @@ jobs:
- name: Tar folder
run: tar -czf hassio/home_assistant_frontend_supervisor-${{ github.event.release.tag_name }}.tar.gz -C hassio/build .
- name: Upload release asset
uses: softprops/action-gh-release@v2.1.0
uses: softprops/action-gh-release@v2.2.1
with:
files: hassio/home_assistant_frontend_supervisor-${{ github.event.release.tag_name }}.tar.gz
2 changes: 1 addition & 1 deletion build-scripts/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default [
"import/extensions": "off",
"import/no-dynamic-require": "off",
"global-require": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-require-imports": "off",
"prefer-arrow-callback": "off",
},
},
Expand Down
17 changes: 17 additions & 0 deletions build-scripts/gulp/index.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import "./app.js";
import "./cast.js";
import "./clean.js";
import "./compress.js";
import "./demo.js";
import "./download-translations.js";
import "./entry-html.js";
import "./fetch-nightly-translations.js";
import "./gallery.js";
import "./gather-static.js";
import "./gen-icons-json.js";
import "./hassio.js";
import "./landing-page.js";
import "./locale-data.js";
import "./rspack.js";
import "./service-worker.js";
import "./translations.js";
2 changes: 1 addition & 1 deletion cast/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Home Assistant Cast is made up of two separate applications:

### Setting dev variables

Open `src/cast/dev_const.ts` and change `CAST_DEV_APP_ID` to the ID of the app you just created. And set the `CAST_DEV_HASS_URL` to the url of you development machine.
Open `src/cast/dev_const.ts` and change `CAST_DEV_APP_ID` to the ID of the app you just created. And set the `CAST_DEV_HASS_URL` to the url of your development machine.

### Changing configuration

Expand Down
1 change: 0 additions & 1 deletion cast/src/html/receiver.html.template
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<%= renderTemplate("../../../src/html/_style_base.html.template") %>
<style>
body {
background-color: white;
font-size: initial;
}
</style>
Expand Down
110 changes: 54 additions & 56 deletions cast/src/launcher/layout/hc-cast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import "@material/mwc-list/mwc-list";
import type { ActionDetail } from "@material/mwc-list/mwc-list";
import { mdiCast, mdiCastConnected, mdiViewDashboard } from "@mdi/js";
import type { Auth, Connection } from "home-assistant-js-websocket";
import type { CSSResultGroup, TemplateResult } from "lit";
import type { TemplateResult } from "lit";
import { LitElement, css, html } from "lit";
import { customElement, property, state } from "lit/decorators";
import type { CastManager } from "../../../../src/cast/cast_manager";
Expand Down Expand Up @@ -203,74 +203,72 @@ class HcCast extends LitElement {
}
this.connection.close();
location.reload();
} catch (err: any) {
} catch (_err: any) {
alert("Unable to log out!");
}
}

static get styles(): CSSResultGroup {
return css`
.center-item {
display: flex;
justify-content: space-around;
}
static styles = css`
.center-item {
display: flex;
justify-content: space-around;
}
.action-item {
display: flex;
align-items: center;
justify-content: space-between;
}
.action-item {
display: flex;
align-items: center;
justify-content: space-between;
}
.question {
position: relative;
padding: 8px 16px;
}
.question {
position: relative;
padding: 8px 16px;
}
.question:before {
border-radius: 4px;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
pointer-events: none;
content: "";
background-color: var(--primary-color);
opacity: 0.12;
will-change: opacity;
}
.question:before {
border-radius: 4px;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
pointer-events: none;
content: "";
background-color: var(--primary-color);
opacity: 0.12;
will-change: opacity;
}
.connection,
.connection a {
color: var(--secondary-text-color);
}
.connection,
.connection a {
color: var(--secondary-text-color);
}
mwc-button ha-svg-icon {
margin-right: 8px;
margin-inline-end: 8px;
margin-inline-start: initial;
height: 18px;
}
mwc-button ha-svg-icon {
margin-right: 8px;
margin-inline-end: 8px;
margin-inline-start: initial;
height: 18px;
}
ha-list-item ha-icon,
ha-list-item ha-svg-icon {
padding: 12px;
color: var(--secondary-text-color);
}
ha-list-item ha-icon,
ha-list-item ha-svg-icon {
padding: 12px;
color: var(--secondary-text-color);
}
:host([hide-icons]) ha-icon {
display: none;
}
:host([hide-icons]) ha-icon {
display: none;
}
.spacer {
flex: 1;
}
.spacer {
flex: 1;
}
.card-content a {
color: var(--primary-color);
}
`;
}
.card-content a {
color: var(--primary-color);
}
`;
}

declare global {
Expand Down
58 changes: 28 additions & 30 deletions cast/src/launcher/layout/hc-connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
ERR_INVALID_HTTPS_TO_HTTP,
getAuth,
} from "home-assistant-js-websocket";
import type { CSSResultGroup, TemplateResult } from "lit";
import type { TemplateResult } from "lit";
import { css, html, LitElement } from "lit";
import { customElement, state } from "lit/decorators";
import type { CastManager } from "../../../../src/cast/cast_manager";
Expand Down Expand Up @@ -215,7 +215,7 @@ export class HcConnect extends LitElement {
let url: URL;
try {
url = new URL(value);
} catch (err: any) {
} catch (_err: any) {
this.error = "Invalid URL";
return;
}
Expand Down Expand Up @@ -252,7 +252,7 @@ export class HcConnect extends LitElement {
this.loading = false;
return;
} finally {
// Clear url if we have a auth callback in url.
// Clear url if we have an auth callback in url.
if (location.search.includes("auth_callback=1")) {
history.replaceState(null, "", location.pathname);
}
Expand Down Expand Up @@ -288,41 +288,39 @@ export class HcConnect extends LitElement {
try {
saveTokens(null);
location.reload();
} catch (err: any) {
} catch (_err: any) {
alert("Unable to log out!");
}
}

static get styles(): CSSResultGroup {
return css`
.card-content a {
color: var(--primary-color);
}
.card-actions a {
text-decoration: none;
}
.error {
color: red;
font-weight: bold;
}
static styles = css`
.card-content a {
color: var(--primary-color);
}
.card-actions a {
text-decoration: none;
}
.error {
color: red;
font-weight: bold;
}
.error a {
color: darkred;
}
.error a {
color: darkred;
}
mwc-button ha-svg-icon {
margin-left: 8px;
}
mwc-button ha-svg-icon {
margin-left: 8px;
}
.spacer {
flex: 1;
}
.spacer {
flex: 1;
}
ha-textfield {
width: 100%;
}
`;
}
ha-textfield {
width: 100%;
}
`;
}

declare global {
Expand Down
Loading

0 comments on commit 266e28a

Please sign in to comment.