Skip to content

Commit

Permalink
Merge branch 'home-assistant:dev' into energy-devices-detail
Browse files Browse the repository at this point in the history
  • Loading branch information
karwosts authored Jan 3, 2024
2 parents 1bd0e2b + 8a8b04e commit 1b1da65
Show file tree
Hide file tree
Showing 154 changed files with 6,727 additions and 3,163 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ body:
required: true
- label: I have tried a different browser to see if it is related to my browser.
required: true
- label: I have tried reproducing the issue in [safe mode](https://www.home-assistant.io/blog/2023/11/01/release-202311/#restarting-into-safe-mode) to rule out problems with unsupported custom resources.
- type: markdown
attributes:
value: |
Expand Down
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/[email protected].0
uses: actions/[email protected].1
with:
node-version-file: ".nvmrc"
cache: yarn
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
ref: master

- name: Setup Node
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
node-version-file: ".nvmrc"
cache: yarn
Expand Down
10 changes: 5 additions & 5 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/[email protected].0
uses: actions/[email protected].1
with:
node-version-file: ".nvmrc"
cache: yarn
Expand Down Expand Up @@ -57,14 +57,14 @@ jobs:
- name: Check out files from GitHub
uses: actions/[email protected]
- name: Setup Node
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
node-version-file: ".nvmrc"
cache: yarn
- name: Install dependencies
run: yarn install --immutable
- name: Build resources
run: ./node_modules/.bin/gulp build-translations build-locale-data
run: ./node_modules/.bin/gulp gen-icons-json build-translations build-locale-data
- name: Run Tests
run: yarn run test
build:
Expand All @@ -75,7 +75,7 @@ jobs:
- name: Check out files from GitHub
uses: actions/[email protected]
- name: Setup Node
uses: actions/[email protected].0
uses: actions/[email protected].1
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/[email protected].0
uses: actions/[email protected].1
with:
node-version-file: ".nvmrc"
cache: yarn
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -57,4 +57,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
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/[email protected].0
uses: actions/[email protected].1
with:
node-version-file: ".nvmrc"
cache: yarn
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
ref: master

- name: Setup Node
uses: actions/[email protected].0
uses: actions/[email protected].1
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/[email protected].0
uses: actions/[email protected].1
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/[email protected].0
uses: actions/[email protected].1
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/[email protected].0
uses: actions/[email protected].1
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/[email protected].0
uses: actions/[email protected].1
with:
node-version-file: ".nvmrc"
cache: yarn
Expand Down
5 changes: 3 additions & 2 deletions build-scripts/bundle.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const path = require("path");
const env = require("./env.cjs");
const paths = require("./paths.cjs");
const { dependencies } = require("../package.json");

// GitHub base URL to use for production source maps
// Nightly builds use the commit SHA, otherwise assumes there is a tag that matches the version
Expand Down Expand Up @@ -90,7 +91,7 @@ module.exports.babelOptions = ({ latestBuild, isProdBuild, isTestBuild }) => ({
"@babel/preset-env",
{
useBuiltIns: latestBuild ? false : "usage",
corejs: latestBuild ? false : "3.33",
corejs: latestBuild ? false : dependencies["core-js"],
bugfixes: true,
shippedProposals: true,
},
Expand Down Expand Up @@ -140,7 +141,7 @@ module.exports.babelOptions = ({ latestBuild, isProdBuild, isTestBuild }) => ({
// Import helpers and regenerator from runtime package
[
"@babel/plugin-transform-runtime",
{ version: require("../package.json").dependencies["@babel/runtime"] },
{ version: dependencies["@babel/runtime"] },
],
// Support some proposals still in TC39 process
["@babel/plugin-proposal-decorators", { decoratorsBeforeExport: true }],
Expand Down
2 changes: 1 addition & 1 deletion gallery/src/data/demo_states.js
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ export default {
away_mode: "on",
aux_heat: "off",
unit_of_measurement: "°C",
friendly_name: "Hvac",
friendly_name: "HVAC",
supported_features: 3833,
},
last_changed: "2018-07-19T10:44:46.200650+00:00",
Expand Down
29 changes: 29 additions & 0 deletions gallery/src/pages/lovelace/thermostat-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@ const ENTITIES = [
friendly_name: "Nest",
supported_features: 43,
}),
getEntity("climate", "sensibo", "fan_only", {
current_temperature: null,
temperature: null,
min_temp: 0,
max_temp: 1,
target_temp_step: 1,
hvac_modes: ["fan_only", "off"],
friendly_name: "Sensibo purifier",
fan_modes: ["low", "high"],
fan_mode: "low",
supported_features: 9,
}),
getEntity("climate", "unavailable", "unavailable", {
supported_features: 43,
}),
Expand All @@ -57,6 +69,23 @@ const CONFIGS = [
entity: climate.nest
`,
},
{
heading: "Fan only example",
config: `
- type: thermostat
entity: climate.sensibo
features:
- type: climate-hvac-modes
hvac_modes:
- fan_only
- 'off'
- type: climate-fan-modes
style: icons
fan_modes:
- low
- high
`,
},
{
heading: "Unavailable",
config: `
Expand Down
15 changes: 15 additions & 0 deletions gallery/src/pages/more-info/climate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,21 @@ const ENTITIES = [
max_temp: 30,
supported_features: ClimateEntityFeature.TARGET_TEMPERATURE,
}),
getEntity("climate", "fan", "fan_only", {
friendly_name: "Basic fan",
hvac_modes: ["fan_only", "off"],
hvac_mode: "fan_only",
fan_modes: ["low", "high"],
fan_mode: "low",
current_temperature: null,
temperature: null,
min_temp: 0,
max_temp: 1,
target_temp_step: 1,
supported_features:
// eslint-disable-next-line no-bitwise
ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.FAN_MODE,
}),
getEntity("climate", "hvac", "auto", {
friendly_name: "Basic hvac",
hvac_modes: ["auto", "off"],
Expand Down
28 changes: 12 additions & 16 deletions gallery/src/pages/more-info/update.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
import { html, LitElement, PropertyValues, TemplateResult } from "lit";
import { customElement, property, query } from "lit/decorators";
import "../../../../src/components/ha-card";
import {
UPDATE_SUPPORT_BACKUP,
UPDATE_SUPPORT_PROGRESS,
UPDATE_SUPPORT_INSTALL,
UPDATE_SUPPORT_RELEASE_NOTES,
} from "../../../../src/data/update";
import "../../../../src/dialogs/more-info/more-info-content";
import { getEntity } from "../../../../src/fake_data/entity";
import {
Expand All @@ -15,13 +9,14 @@ import {
} from "../../../../src/fake_data/provide_hass";
import "../../components/demo-more-infos";
import { LONG_TEXT } from "../../data/text";
import { UpdateEntityFeature } from "../../../../src/data/update";

const base_attributes = {
title: "Awesome",
installed_version: "1.2.2",
latest_version: "1.2.3",
release_url: "https://home-assistant.io",
supported_features: UPDATE_SUPPORT_INSTALL,
supported_features: UpdateEntityFeature.INSTALL,
skipped_version: null,
in_progress: false,
release_summary:
Expand Down Expand Up @@ -61,7 +56,7 @@ const ENTITIES = [
getEntity("update", "update7", "on", {
...base_attributes,
supported_features:
base_attributes.supported_features + UPDATE_SUPPORT_BACKUP,
base_attributes.supported_features + UpdateEntityFeature.BACKUP,
friendly_name: "With backup support",
}),
getEntity("update", "update8", "on", {
Expand All @@ -73,21 +68,21 @@ const ENTITIES = [
...base_attributes,
in_progress: 25,
supported_features:
base_attributes.supported_features + UPDATE_SUPPORT_PROGRESS,
base_attributes.supported_features + UpdateEntityFeature.PROGRESS,
friendly_name: "With 25 in_progress",
}),
getEntity("update", "update10", "on", {
...base_attributes,
in_progress: 50,
supported_features:
base_attributes.supported_features + UPDATE_SUPPORT_PROGRESS,
base_attributes.supported_features + UpdateEntityFeature.PROGRESS,
friendly_name: "With 50 in_progress",
}),
getEntity("update", "update11", "on", {
...base_attributes,
in_progress: 75,
supported_features:
base_attributes.supported_features + UPDATE_SUPPORT_PROGRESS,
base_attributes.supported_features + UpdateEntityFeature.PROGRESS,
friendly_name: "With 75 in_progress",
}),
getEntity("update", "update12", "unavailable", {
Expand All @@ -114,19 +109,19 @@ const ENTITIES = [
...base_attributes,
friendly_name: "Update with release notes",
supported_features:
base_attributes.supported_features + UPDATE_SUPPORT_RELEASE_NOTES,
base_attributes.supported_features + UpdateEntityFeature.RELEASE_NOTES,
}),
getEntity("update", "update17", "off", {
...base_attributes,
friendly_name: "Update with release notes error",
supported_features:
base_attributes.supported_features + UPDATE_SUPPORT_RELEASE_NOTES,
base_attributes.supported_features + UpdateEntityFeature.RELEASE_NOTES,
}),
getEntity("update", "update18", "off", {
...base_attributes,
friendly_name: "Update with release notes loading",
supported_features:
base_attributes.supported_features + UPDATE_SUPPORT_RELEASE_NOTES,
base_attributes.supported_features + UpdateEntityFeature.RELEASE_NOTES,
}),
getEntity("update", "update19", "on", {
...base_attributes,
Expand All @@ -142,9 +137,10 @@ const ENTITIES = [
getEntity("update", "update21", "on", {
...base_attributes,
in_progress: true,
friendly_name: "Update with in_progress true and UPDATE_SUPPORT_PROGRESS",
friendly_name:
"Update with in_progress true and UpdateEntityFeature.PROGRESS",
supported_features:
base_attributes.supported_features + UPDATE_SUPPORT_PROGRESS,
base_attributes.supported_features + UpdateEntityFeature.PROGRESS,
}),
];

Expand Down
1 change: 0 additions & 1 deletion hassio/src/dialogs/datadisk/dialog-hassio-datadisk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { customElement, property, state } from "lit/decorators";
import memoizeOne from "memoize-one";
import { fireEvent } from "../../../../src/common/dom/fire_event";
import "../../../../src/components/ha-circular-progress";
import "../../../../src/components/ha-markdown";
import "../../../../src/components/ha-select";
import {
extractApiErrorMessage,
Expand Down
Loading

0 comments on commit 1b1da65

Please sign in to comment.