Skip to content

Commit

Permalink
20231030.0 (#18478)
Browse files Browse the repository at this point in the history
  • Loading branch information
bramkragten authored Oct 30, 2023
2 parents 3d674cf + 8e1e75d commit 3b553a3
Show file tree
Hide file tree
Showing 23 changed files with 383 additions and 311 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cast_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
ref: dev

- name: Setup Node
uses: actions/setup-node@v3.8.1
uses: actions/setup-node@v4.0.0
with:
node-version-file: ".nvmrc"
cache: yarn
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
ref: master

- name: Setup Node
uses: actions/setup-node@v3.8.1
uses: actions/setup-node@v4.0.0
with:
node-version-file: ".nvmrc"
cache: yarn
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Check out files from GitHub
uses: actions/[email protected]
- name: Setup Node
uses: actions/setup-node@v3.8.1
uses: actions/setup-node@v4.0.0
with:
node-version-file: ".nvmrc"
cache: yarn
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
- name: Check out files from GitHub
uses: actions/[email protected]
- name: Setup Node
uses: actions/setup-node@v3.8.1
uses: actions/setup-node@v4.0.0
with:
node-version-file: ".nvmrc"
cache: yarn
Expand All @@ -75,7 +75,7 @@ jobs:
- name: Check out files from GitHub
uses: actions/[email protected]
- name: Setup Node
uses: actions/setup-node@v3.8.1
uses: actions/setup-node@v4.0.0
with:
node-version-file: ".nvmrc"
cache: yarn
Expand All @@ -99,7 +99,7 @@ jobs:
- name: Check out files from GitHub
uses: actions/[email protected]
- name: Setup Node
uses: actions/setup-node@v3.8.1
uses: actions/setup-node@v4.0.0
with:
node-version-file: ".nvmrc"
cache: yarn
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/demo_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
ref: dev

- name: Setup Node
uses: actions/setup-node@v3.8.1
uses: actions/setup-node@v4.0.0
with:
node-version-file: ".nvmrc"
cache: yarn
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
ref: master

- name: Setup Node
uses: actions/setup-node@v3.8.1
uses: actions/setup-node@v4.0.0
with:
node-version-file: ".nvmrc"
cache: yarn
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/design_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: actions/[email protected]

- name: Setup Node
uses: actions/setup-node@v3.8.1
uses: actions/setup-node@v4.0.0
with:
node-version-file: ".nvmrc"
cache: yarn
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/design_preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: actions/[email protected]

- name: Setup Node
uses: actions/setup-node@v3.8.1
uses: actions/setup-node@v4.0.0
with:
node-version-file: ".nvmrc"
cache: yarn
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}

- name: Setup Node
uses: actions/setup-node@v3.8.1
uses: actions/setup-node@v4.0.0
with:
node-version-file: ".nvmrc"
cache: yarn
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}

- name: Setup Node
uses: actions/setup-node@v3.8.1
uses: actions/setup-node@v4.0.0
with:
node-version-file: ".nvmrc"
cache: yarn
Expand Down
3 changes: 2 additions & 1 deletion hassio/src/components/hassio-filter-addons.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import Fuse from "fuse.js";
import type { IFuseOptions } from "fuse.js";
import { StoreAddon } from "../../../src/data/supervisor/store";

export function filterAndSort(addons: StoreAddon[], filter: string) {
const options: Fuse.IFuseOptions<StoreAddon> = {
const options: IFuseOptions<StoreAddon> = {
keys: ["name", "description", "slug"],
isCaseSensitive: false,
minMatchCharLength: 2,
Expand Down
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
"@braintree/sanitize-url": "6.0.4",
"@codemirror/autocomplete": "6.10.2",
"@codemirror/commands": "6.3.0",
"@codemirror/language": "6.9.1",
"@codemirror/language": "6.9.2",
"@codemirror/legacy-modes": "6.3.3",
"@codemirror/search": "6.5.4",
"@codemirror/state": "6.3.1",
"@codemirror/view": "6.21.3",
"@codemirror/view": "6.21.4",
"@egjs/hammerjs": "2.0.17",
"@formatjs/intl-datetimeformat": "6.11.0",
"@formatjs/intl-displaynames": "6.6.0",
"@formatjs/intl-datetimeformat": "6.11.1",
"@formatjs/intl-displaynames": "6.6.1",
"@formatjs/intl-getcanonicallocales": "2.3.0",
"@formatjs/intl-listformat": "7.5.0",
"@formatjs/intl-locale": "3.4.0",
Expand Down Expand Up @@ -94,8 +94,8 @@
"@polymer/paper-toast": "3.0.1",
"@polymer/polymer": "3.5.1",
"@thomasloven/round-slider": "0.6.0",
"@vaadin/combo-box": "24.2.0",
"@vaadin/vaadin-themable-mixin": "24.2.0",
"@vaadin/combo-box": "24.2.1",
"@vaadin/vaadin-themable-mixin": "24.2.1",
"@vibrant/color": "3.2.1-alpha.1",
"@vibrant/core": "3.2.1-alpha.1",
"@vibrant/quantizer-mmcq": "3.2.1-alpha.1",
Expand All @@ -111,7 +111,7 @@
"date-fns-tz": "2.0.0",
"deep-clone-simple": "1.1.1",
"deep-freeze": "0.0.1",
"fuse.js": "6.6.2",
"fuse.js": "7.0.0",
"google-timezones-json": "1.2.0",
"hls.js": "1.4.12",
"home-assistant-js-websocket": "9.1.0",
Expand All @@ -138,11 +138,11 @@
"tinykeys": "2.1.0",
"tsparticles-engine": "2.12.0",
"tsparticles-preset-links": "2.12.0",
"ua-parser-js": "1.0.36",
"ua-parser-js": "1.0.37",
"unfetch": "5.0.0",
"vis-data": "7.1.7",
"vis-network": "9.1.8",
"vue": "2.7.14",
"vue": "2.7.15",
"vue2-daterange-picker": "0.6.8",
"weekstart": "2.0.0",
"workbox-cacheable-response": "7.0.0",
Expand All @@ -159,7 +159,7 @@
"@babel/plugin-transform-runtime": "7.23.2",
"@babel/preset-env": "7.23.2",
"@babel/preset-typescript": "7.23.2",
"@bundle-stats/plugin-webpack-filter": "4.7.7",
"@bundle-stats/plugin-webpack-filter": "4.7.8",
"@koa/cors": "4.0.0",
"@lokalise/node-api": "12.0.0",
"@octokit/auth-oauth-device": "6.0.1",
Expand Down Expand Up @@ -188,8 +188,8 @@
"@types/tar": "6.1.7",
"@types/ua-parser-js": "0.7.38",
"@types/webspeechapi": "0.0.29",
"@typescript-eslint/eslint-plugin": "6.8.0",
"@typescript-eslint/parser": "6.8.0",
"@typescript-eslint/eslint-plugin": "6.9.0",
"@typescript-eslint/parser": "6.9.0",
"@web/dev-server": "0.1.38",
"@web/dev-server-rollup": "0.4.1",
"babel-loader": "9.1.3",
Expand All @@ -200,10 +200,10 @@
"eslint-config-airbnb-base": "15.0.0",
"eslint-config-airbnb-typescript": "17.1.0",
"eslint-config-prettier": "9.0.0",
"eslint-import-resolver-webpack": "0.13.7",
"eslint-import-resolver-webpack": "0.13.8",
"eslint-plugin-disable": "2.0.3",
"eslint-plugin-import": "2.28.1",
"eslint-plugin-lit": "1.9.1",
"eslint-plugin-import": "2.29.0",
"eslint-plugin-lit": "1.10.1",
"eslint-plugin-lit-a11y": "4.1.0",
"eslint-plugin-unused-imports": "3.0.0",
"eslint-plugin-wc": "2.0.4",
Expand All @@ -222,7 +222,7 @@
"instant-mocha": "1.5.2",
"jszip": "3.10.1",
"lint-staged": "15.0.2",
"lit-analyzer": "2.0.0-pre.3",
"lit-analyzer": "2.0.1",
"lodash.template": "4.5.0",
"magic-string": "0.30.5",
"map-stream": "0.0.7",
Expand All @@ -241,7 +241,7 @@
"systemjs": "6.14.2",
"tar": "6.2.0",
"terser-webpack-plugin": "5.3.9",
"ts-lit-plugin": "2.0.0-pre.1",
"ts-lit-plugin": "2.0.1",
"typescript": "5.2.2",
"vinyl-buffer": "1.0.1",
"vinyl-source-stream": "2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "home-assistant-frontend"
version = "20231027.0"
version = "20231030.0"
license = {text = "Apache-2.0"}
description = "The Home Assistant frontend"
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion src/components/chart/chart-date-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ _adapters._date.override({
this.options.config
);
case "week":
return formatDate(
return formatDateVeryShort(
new Date(time),
this.options.locale,
this.options.config
Expand Down
16 changes: 15 additions & 1 deletion src/components/chart/statistics-chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ export class StatisticsChart extends LitElement {

@property({ type: Boolean }) public isLoadingData = false;

@property() public period?: string;

@state() private _chartData: ChartData = { datasets: [] };

@state() private _statisticIds: string[] = [];
Expand All @@ -92,7 +94,12 @@ export class StatisticsChart extends LitElement {
}

public willUpdate(changedProps: PropertyValues) {
if (!this.hasUpdated || changedProps.has("unit")) {
if (
!this.hasUpdated ||
changedProps.has("unit") ||
changedProps.has("period") ||
changedProps.has("chartType")
) {
this._createOptions();
}
if (
Expand Down Expand Up @@ -160,6 +167,7 @@ export class StatisticsChart extends LitElement {
},
},
ticks: {
source: this.chartType === "bar" ? "data" : undefined,
maxRotation: 0,
sampleSize: 5,
autoSkipPadding: 20,
Expand All @@ -173,6 +181,12 @@ export class StatisticsChart extends LitElement {
},
time: {
tooltipFormat: "datetime",
unit:
this.chartType === "bar" &&
this.period &&
["hour", "day", "week", "month"].includes(this.period)
? this.period
: undefined,
},
},
y: {
Expand Down
3 changes: 1 addition & 2 deletions src/components/ha-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ export class HaButton extends Button {
display: flex;
}
.slot-container {
width: 100%;
overflow: hidden;
overflow: var(--button-slot-container-overflow, visible);
}
`,
];
Expand Down
35 changes: 17 additions & 18 deletions src/data/automation_i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -642,10 +642,7 @@ const tryDescribeTrigger = (
}

// Device Trigger
if (trigger.platform === "device") {
if (!trigger.device_id) {
return "Device trigger";
}
if (trigger.platform === "device" && trigger.device_id) {
const config = trigger as DeviceTrigger;
const localized = localizeDeviceAutomationTrigger(
hass,
Expand All @@ -661,9 +658,12 @@ const tryDescribeTrigger = (
}`;
}

return `${
trigger.platform ? trigger.platform.replace(/_/g, " ") : "Unknown"
} trigger`;
return (
hass.localize(
`ui.panel.config.automation.editor.triggers.type.${trigger.platform}.label`
) ||
hass.localize(`ui.panel.config.automation.editor.triggers.unknown_trigger`)
);
};

export const describeCondition = (
Expand Down Expand Up @@ -1074,10 +1074,7 @@ const tryDescribeCondition = (
);
}

if (condition.condition === "device") {
if (!condition.device_id) {
return "Device condition";
}
if (condition.condition === "device" && condition.device_id) {
const config = condition as DeviceCondition;
const localized = localizeDeviceAutomationCondition(
hass,
Expand All @@ -1093,14 +1090,16 @@ const tryDescribeCondition = (
}`;
}

if (condition.condition === "trigger") {
if (!condition.id) {
return "Trigger condition";
}
if (condition.condition === "trigger" && condition.id) {
return `When triggered by ${condition.id}`;
}

return `${
condition.condition ? condition.condition.replace(/_/g, " ") : "Unknown"
} condition`;
return (
hass.localize(
`ui.panel.config.automation.editor.conditions.type.${condition.condition}.label`
) ||
hass.localize(
`ui.panel.config.automation.editor.conditions.unknown_condition`
)
);
};
15 changes: 10 additions & 5 deletions src/data/todo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@ export const updateItem = (
entity_id: string,
item: TodoItem
): Promise<ServiceCallResponse> =>
hass.callService("todo", "update_item", item, { entity_id });
hass.callService(
"todo",
"update_item",
{ item: item.uid, rename: item.summary, status: item.status },
{ entity_id }
);

export const createItem = (
hass: HomeAssistant,
Expand All @@ -70,9 +75,9 @@ export const createItem = (
): Promise<ServiceCallResponse> =>
hass.callService(
"todo",
"create_item",
"add_item",
{
summary,
item: summary,
},
{ entity_id }
);
Expand All @@ -84,9 +89,9 @@ export const deleteItem = (
): Promise<ServiceCallResponse> =>
hass.callService(
"todo",
"delete_item",
"remove_item",
{
uid,
item: uid,
},
{ entity_id }
);
Expand Down
Loading

0 comments on commit 3b553a3

Please sign in to comment.