Skip to content

Commit

Permalink
20230908.0 (#17866)
Browse files Browse the repository at this point in the history
  • Loading branch information
bramkragten authored Sep 8, 2023
2 parents 35496ea + 0276430 commit db272e3
Show file tree
Hide file tree
Showing 8 changed files with 275 additions and 292 deletions.
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"license": "Apache-2.0",
"type": "module",
"dependencies": {
"@babel/runtime": "7.22.11",
"@babel/runtime": "7.22.15",
"@braintree/sanitize-url": "6.0.4",
"@codemirror/autocomplete": "6.9.0",
"@codemirror/commands": "6.2.5",
Expand Down Expand Up @@ -153,11 +153,11 @@
"xss": "1.0.14"
},
"devDependencies": {
"@babel/core": "7.22.11",
"@babel/plugin-proposal-decorators": "7.22.10",
"@babel/plugin-transform-runtime": "7.22.10",
"@babel/preset-env": "7.22.14",
"@babel/preset-typescript": "7.22.11",
"@babel/core": "7.22.15",
"@babel/plugin-proposal-decorators": "7.22.15",
"@babel/plugin-transform-runtime": "7.22.15",
"@babel/preset-env": "7.22.15",
"@babel/preset-typescript": "7.22.15",
"@koa/cors": "4.0.0",
"@lokalise/node-api": "11.0.1",
"@octokit/auth-oauth-device": "6.0.0",
Expand All @@ -170,8 +170,8 @@
"@rollup/plugin-node-resolve": "15.2.1",
"@rollup/plugin-replace": "5.0.2",
"@types/babel__plugin-transform-runtime": "7.9.2",
"@types/chromecast-caf-receiver": "6.0.9",
"@types/chromecast-caf-sender": "1.0.5",
"@types/chromecast-caf-receiver": "6.0.10",
"@types/chromecast-caf-sender": "1.0.6",
"@types/esprima": "4.0.3",
"@types/glob": "8.1.0",
"@types/html-minifier-terser": "7.0.0",
Expand All @@ -186,8 +186,8 @@
"@types/tar": "6.1.5",
"@types/ua-parser-js": "0.7.37",
"@types/webspeechapi": "0.0.29",
"@typescript-eslint/eslint-plugin": "6.5.0",
"@typescript-eslint/parser": "6.5.0",
"@typescript-eslint/eslint-plugin": "6.6.0",
"@typescript-eslint/parser": "6.6.0",
"@web/dev-server": "0.1.38",
"@web/dev-server-rollup": "0.4.1",
"babel-loader": "9.1.3",
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 = "20230906.1"
version = "20230908.0"
license = {text = "Apache-2.0"}
description = "The Home Assistant frontend"
readme = "README.md"
Expand Down
3 changes: 0 additions & 3 deletions src/components/chart/ha-chart-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,6 @@ export class HaChartBase extends LitElement {
height: 0;
transition: height 300ms cubic-bezier(0.4, 0, 0.2, 1);
}
.chartContainer {
position: relative;
}
canvas {
max-height: var(--chart-max-height, 400px);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ class HaPanelDevTemplate extends LitElement {
private async _subscribeTemplate() {
this._rendering = true;
await this._unsubscribeTemplate();
this._templateResult = undefined;
try {
this._unsubRenderTemplate = subscribeRenderTemplate(
this.hass.connection,
Expand Down
24 changes: 2 additions & 22 deletions src/panels/lovelace/cards/hui-glance-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import { createEntityNotFoundWarning } from "../components/hui-warning";
import "../components/hui-warning-element";
import { LovelaceCard, LovelaceCardEditor } from "../types";
import { GlanceCardConfig, GlanceConfigEntity } from "./types";
import { hasConfigOrEntitiesChanged } from "../common/has-changed";

@customElement("hui-glance-card")
export class HuiGlanceCard extends LitElement implements LovelaceCard {
Expand Down Expand Up @@ -121,28 +122,7 @@ export class HuiGlanceCard extends LitElement implements LovelaceCard {
}

protected shouldUpdate(changedProps: PropertyValues): boolean {
if (changedProps.has("_config")) {
return true;
}

const oldHass = changedProps.get("hass") as HomeAssistant | undefined;

if (
!this._configEntities ||
!oldHass ||
oldHass.themes !== this.hass!.themes ||
oldHass.locale !== this.hass!.locale
) {
return true;
}

for (const entity of this._configEntities) {
if (oldHass.states[entity.entity] !== this.hass!.states[entity.entity]) {
return true;
}
}

return false;
return hasConfigOrEntitiesChanged(this, changedProps);
}

protected render() {
Expand Down
5 changes: 5 additions & 0 deletions src/panels/lovelace/common/has-changed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ export function hasConfigChanged(
oldHass.themes !== element.hass!.themes ||
oldHass.locale !== element.hass!.locale ||
oldHass.localize !== element.hass.localize ||
oldHass.formatEntityState !== element.hass.formatEntityState ||
oldHass.formatEntityAttributeName !==
element.hass.formatEntityAttributeName ||
oldHass.formatEntityAttributeValue !==
element.hass.formatEntityAttributeValue ||
oldHass.config.state !== element.hass.config.state
) {
return true;
Expand Down
4 changes: 2 additions & 2 deletions src/state/connection-mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@ export const connectionMixin = <T extends Constructor<HassBaseEl>>(
// @ts-ignore
this._loadFragmentTranslations(this.hass?.language, fragment),
formatEntityState: (stateObj, state) =>
(state !== null ? state : stateObj.state) ?? "",
(state != null ? state : stateObj.state) ?? "",
formatEntityAttributeName: (_stateObj, attribute) => attribute,
formatEntityAttributeValue: (stateObj, attribute, value) =>
value !== null ? value : stateObj.attributes[attribute] ?? "",
value != null ? value : stateObj.attributes[attribute] ?? "",
...getState(),
...this._pendingHass,
};
Expand Down
Loading

0 comments on commit db272e3

Please sign in to comment.