Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

20240603.0 #20974

Merged
merged 23 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
7416ae7
Fix double unsubscribe in todo list card (#20928)
karwosts May 30, 2024
cfa84f3
Update typescript-eslint monorepo to v7.11.0 (#20932)
renovate[bot] May 31, 2024
e9e53e9
Update dependency workbox-build to v7.1.1 (#20937)
renovate[bot] May 31, 2024
474c8c2
Update dependency ua-parser-js to v1.0.38 (#20939)
renovate[bot] May 31, 2024
d449e10
Update dependency eslint-plugin-lit to v1.14.0 (#20950)
renovate[bot] Jun 2, 2024
49f1ad6
Update dependency @codemirror/autocomplete to v6.16.1 (#20948)
renovate[bot] Jun 2, 2024
fa03c58
Update dependency tar to v7.2.0 (#20952)
renovate[bot] Jun 2, 2024
f78e757
Bump relative-ci/agent-action from 2.1.10 to 2.1.11 (#20964)
dependabot[bot] Jun 3, 2024
c55720c
Update dependency @codemirror/autocomplete to v6.16.2 (#20965)
renovate[bot] Jun 3, 2024
d7cb4cb
Revert "Filter unrecorded entities from history panel (#19621)" (#20941)
karwosts Jun 3, 2024
e7f3393
Tweak styles Assist dialog (#20960)
balloob Jun 3, 2024
3a855f9
Fix broken config switch in demo (#20971)
piitaya Jun 3, 2024
6bee3ef
Fix fallback icon color in dark mode (#20969)
piitaya Jun 3, 2024
d9a9038
Update ha-entity-marker.ts: add CSS variable for border-radius (#20914)
ildar170975 Jun 3, 2024
c08d9a9
Fix card display in view panel (#20972)
piitaya Jun 3, 2024
0add65f
Use event for section visibility instead of mutation observer (#20967)
piitaya Jun 3, 2024
9f6afb1
Make lovelace optional in card and section (#20970)
piitaya Jun 3, 2024
250f87c
Improve error messages in config entries (#20934)
silamon Jun 3, 2024
f2b2da9
Fix filters for entity/device from integrations dashboard (#20953)
ZephireNZ Jun 3, 2024
e48286c
Fix conditional card visiblity inside section (#20966)
piitaya Jun 3, 2024
0297ec5
Add visibility editor to card editor (#20926)
piitaya Jun 3, 2024
c646f3c
Save search filter in session storage (#20973)
bramkragten Jun 3, 2024
9717304
Bumped version to 20240603.0
bramkragten Jun 3, 2024
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/workflows/relative-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Send bundle stats and build information to RelativeCI
uses: relative-ci/[email protected].10
uses: relative-ci/[email protected].11
with:
key: ${{ secrets[format('RELATIVE_CI_KEY_{0}_{1}', matrix.bundle, matrix.build)] }}
token: ${{ github.token }}
Expand Down
10 changes: 5 additions & 5 deletions demo/src/stubs/lovelace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ export const mockLovelace = (
hass.mockWS("lovelace/resources", () => Promise.resolve([]));
};

customElements.whenDefined("hui-view").then(() => {
customElements.whenDefined("hui-card").then(() => {
// eslint-disable-next-line
const HUIView = customElements.get("hui-view");
const HUIView = customElements.get("hui-card");
// Patch HUI-VIEW to make the lovelace object available to the demo card
const oldCreateCard = HUIView!.prototype.createCardElement;
const oldCreateCard = HUIView!.prototype.createElement;

HUIView!.prototype.createCardElement = function (config) {
HUIView!.prototype.createElement = function (config) {
const el = oldCreateCard.call(this, config);
if (el.tagName === "HA-DEMO-CARD") {
if (config.type === "custom:ha-demo-card") {
(el as HADemoCard).lovelace = this.lovelace;
}
return el;
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"dependencies": {
"@babel/runtime": "7.24.6",
"@braintree/sanitize-url": "7.0.2",
"@codemirror/autocomplete": "6.16.0",
"@codemirror/autocomplete": "6.16.2",
"@codemirror/commands": "6.5.0",
"@codemirror/language": "6.10.1",
"@codemirror/legacy-modes": "6.4.0",
Expand Down Expand Up @@ -133,7 +133,7 @@
"tinykeys": "2.1.0",
"tsparticles-engine": "2.12.0",
"tsparticles-preset-links": "2.12.0",
"ua-parser-js": "1.0.37",
"ua-parser-js": "1.0.38",
"unfetch": "5.0.0",
"vis-data": "7.1.9",
"vis-network": "9.1.9",
Expand Down Expand Up @@ -185,8 +185,8 @@
"@types/tar": "6.1.13",
"@types/ua-parser-js": "0.7.39",
"@types/webspeechapi": "0.0.29",
"@typescript-eslint/eslint-plugin": "7.10.0",
"@typescript-eslint/parser": "7.10.0",
"@typescript-eslint/eslint-plugin": "7.11.0",
"@typescript-eslint/parser": "7.11.0",
"@web/dev-server": "0.1.38",
"@web/dev-server-rollup": "0.4.1",
"babel-loader": "9.1.3",
Expand All @@ -199,7 +199,7 @@
"eslint-config-prettier": "9.1.0",
"eslint-import-resolver-webpack": "0.13.8",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-lit": "1.13.0",
"eslint-plugin-lit": "1.14.0",
"eslint-plugin-lit-a11y": "4.1.2",
"eslint-plugin-unused-imports": "4.0.0",
"eslint-plugin-wc": "2.1.0",
Expand Down Expand Up @@ -233,7 +233,7 @@
"sinon": "18.0.0",
"source-map-url": "0.4.1",
"systemjs": "6.15.1",
"tar": "7.1.0",
"tar": "7.2.0",
"terser-webpack-plugin": "5.3.10",
"transform-async-modules-webpack-plugin": "1.1.1",
"ts-lit-plugin": "2.0.2",
Expand All @@ -244,7 +244,7 @@
"webpack-manifest-plugin": "5.0.0",
"webpack-stats-plugin": "1.1.3",
"webpackbar": "6.0.1",
"workbox-build": "7.1.0"
"workbox-build": "7.1.1"
},
"_comment": "Polymer 3.2 contained a bug, fixed in https://github.com/Polymer/polymer/pull/5569, add as patch",
"resolutions": {
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 = "20240530.0"
version = "20240603.0"
license = {text = "Apache-2.0"}
description = "The Home Assistant frontend"
readme = "README.md"
Expand Down
3 changes: 1 addition & 2 deletions src/components/ha-icon-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,7 @@ export class HaIconPicker extends LitElement {

static get styles() {
return css`
ha-icon,
ha-svg-icon {
*[slot="icon"] {
color: var(--primary-text-color);
position: relative;
bottom: 2px;
Expand Down
2 changes: 1 addition & 1 deletion src/components/map/ha-entity-marker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class HaEntityMarker extends LitElement {
width: 48px;
height: 48px;
font-size: var(--ha-marker-font-size, 1.5em);
border-radius: 50%;
border-radius: var(--ha-marker-border-radius, 50%);
border: 1px solid var(--ha-marker-color, var(--primary-color));
color: var(--primary-text-color);
background-color: var(--card-background-color);
Expand Down
30 changes: 0 additions & 30 deletions src/data/recorder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@ export interface RecorderInfo {
thread_running: boolean;
}

export interface RecordedEntities {
entity_ids: string[];
}
export interface RecordedExcludedEntities {
recorded_ids: string[];
excluded_ids: string[];
}

export type StatisticType = "change" | "state" | "sum" | "min" | "max" | "mean";

export interface Statistics {
Expand Down Expand Up @@ -332,25 +324,3 @@ export const getDisplayUnit = (

export const isExternalStatistic = (statisticsId: string): boolean =>
statisticsId.includes(":");

let recordedExcludedEntitiesCache: RecordedExcludedEntities | undefined;

export const getRecordedExcludedEntities = async (
hass: HomeAssistant
): Promise<RecordedExcludedEntities> => {
if (recordedExcludedEntitiesCache) {
return recordedExcludedEntitiesCache;
}
const recordedEntities = await hass.callWS<RecordedEntities>({
type: "recorder/recorded_entities",
});

recordedExcludedEntitiesCache = {
recorded_ids: recordedEntities.entity_ids,
excluded_ids: Object.keys(hass.states).filter(
(id) => !recordedEntities.entity_ids.includes(id)
),
};

return recordedExcludedEntitiesCache;
};
7 changes: 6 additions & 1 deletion src/dialogs/voice-command-dialog/ha-voice-command-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,7 @@ export class HaVoiceCommandDialog extends LitElement {
max-height: 100%;
}
.message {
white-space: pre-line;
font-size: 18px;
clear: both;
margin: 8px 0;
Expand Down Expand Up @@ -792,10 +793,14 @@ export class HaVoiceCommandDialog extends LitElement {
direction: var(--direction);
}

.message a {
.message.user a {
color: var(--text-primary-color);
}

.message.hass a {
color: var(--primary-text-color);
}

.message img {
width: 100%;
border-radius: 10px;
Expand Down
14 changes: 14 additions & 0 deletions src/panels/config/automation/ha-automation-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,14 @@ class HaAutomationPicker extends SubscribeMixin(LitElement) {

@state() private _filteredAutomations?: string[] | null;

@storage({
storage: "sessionStorage",
key: "automation-table-search",
state: true,
subscribe: false,
})
private _filter = "";

@storage({
storage: "sessionStorage",
key: "automation-table-filters-full",
Expand Down Expand Up @@ -547,6 +555,8 @@ class HaAutomationPicker extends SubscribeMixin(LitElement) {
"ui.panel.config.automation.picker.no_automations"
)}
@clear-filter=${this._clearFilter}
.filter=${this._filter}
@search-changed=${this._handleSearchChange}
hasFab
clickable
class=${this.narrow ? "narrow" : ""}
Expand Down Expand Up @@ -924,6 +934,10 @@ class HaAutomationPicker extends SubscribeMixin(LitElement) {
this._applyFilters();
};

private _handleSearchChange(ev: CustomEvent) {
this._filter = ev.detail.value;
}

private _filterChanged(ev) {
const type = ev.target.localName;
this._filters = { ...this._filters, [type]: ev.detail };
Expand Down
14 changes: 14 additions & 0 deletions src/panels/config/blueprint/ha-blueprint-overview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,14 @@ class HaBlueprintOverview extends LitElement {
})
private _activeCollapsed?: string;

@storage({
storage: "sessionStorage",
key: "blueprint-table-search",
state: true,
subscribe: false,
})
private _filter: string = "";

private _processedBlueprints = memoizeOne(
(
blueprints: Record<string, Blueprints>,
Expand Down Expand Up @@ -308,6 +316,8 @@ class HaBlueprintOverview extends LitElement {
@sorting-changed=${this._handleSortingChanged}
@grouping-changed=${this._handleGroupingChanged}
@collapsed-changed=${this._handleCollapseChanged}
.filter=${this._filter}
@search-changed=${this._handleSearchChange}
>
<ha-icon-button
slot="toolbar-icon"
Expand Down Expand Up @@ -542,6 +552,10 @@ class HaBlueprintOverview extends LitElement {
this._activeCollapsed = ev.detail.value;
}

private _handleSearchChange(ev: CustomEvent) {
this._filter = ev.detail.value;
}

static get styles(): CSSResultGroup {
return haStyle;
}
Expand Down
65 changes: 33 additions & 32 deletions src/panels/config/devices/ha-config-devices-dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,13 @@ export class HaConfigDeviceDashboard extends SubscribeMixin(LitElement) {

@state() private _selected: string[] = [];

@state() private _filter: string = history.state?.filter || "";
@storage({
storage: "sessionStorage",
key: "devices-table-search",
state: true,
subscribe: false,
})
private _filter: string = history.state?.filter || "";

@storage({
storage: "sessionStorage",
Expand Down Expand Up @@ -199,38 +205,33 @@ export class HaConfigDeviceDashboard extends SubscribeMixin(LitElement) {
}

private _setFiltersFromUrl() {
if (this._searchParms.has("domain")) {
this._filters = {
...this._filters,
"ha-filter-states": {
value: [
...((this._filters["ha-filter-states"]?.value as string[]) || []),
"disabled",
],
items: undefined,
},
"ha-filter-integrations": {
value: [this._searchParms.get("domain")!],
items: undefined,
},
};
}
if (this._searchParms.has("config_entry")) {
this._filters = {
...this._filters,
"ha-filter-states": {
value: [
...((this._filters["ha-filter-states"]?.value as string[]) || []),
"disabled",
],
items: undefined,
},
config_entry: {
value: [this._searchParms.get("config_entry")!],
items: undefined,
},
};
const domain = this._searchParms.get("domain");
const configEntry = this._searchParms.get("config_entry");

if (!domain && !configEntry) {
return;
}

this._filter = history.state?.filter || "";

this._filters = {
"ha-filter-states": {
value: [
...((this._filters["ha-filter-states"]?.value as string[]) || []),
"disabled",
],
items: undefined,
},
"ha-filter-integrations": {
value: domain ? [domain] : [],
items: undefined,
},
config_entry: {
value: configEntry ? [configEntry] : [],
items: undefined,
},
};

if (this._searchParms.has("label")) {
this._filterLabel();
}
Expand Down
Loading
Loading