Skip to content

Commit

Permalink
Merge branch 'dev' into allthebackupchanges
Browse files Browse the repository at this point in the history
  • Loading branch information
piitaya committed Dec 9, 2024
2 parents e2416a7 + bf24d67 commit 7f4186c
Show file tree
Hide file tree
Showing 165 changed files with 341 additions and 281 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
with:
node-version-file: ".nvmrc"
cache: yarn
- uses: actions/cache@v4.1.2
- uses: actions/cache@v4.2.0
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: "node_modules"
Expand All @@ -43,7 +43,7 @@ jobs:
- name: Build resources
run: ./node_modules/.bin/gulp gen-icons-json build-translations build-locale-data gather-gallery-pages
- name: Setup lint cache
uses: actions/cache@v4.1.2
uses: actions/cache@v4.2.0
with:
path: |
node_modules/.cache/prettier
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
with:
node-version-file: ".nvmrc"
cache: yarn
- uses: actions/cache@v4.1.2
- uses: actions/cache@v4.2.0
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: "node_modules"
Expand All @@ -97,7 +97,7 @@ jobs:
with:
node-version-file: ".nvmrc"
cache: yarn
- uses: actions/cache@v4.1.2
- uses: actions/cache@v4.2.0
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: "node_modules"
Expand Down Expand Up @@ -129,7 +129,7 @@ jobs:
with:
node-version-file: ".nvmrc"
cache: yarn
- uses: actions/cache@v4.1.2
- uses: actions/cache@v4.2.0
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: "node_modules"
Expand Down
3 changes: 2 additions & 1 deletion gallery/src/components/demo-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ class DemoCard extends LitElement {

@property({ attribute: false }) public config!: DemoCardConfig;

@property({ attribute: false, type: Boolean }) public showConfig = false;
@property({ attribute: "show-config", type: Boolean })
public showConfig = false;

@state() private _size?: number;

Expand Down
3 changes: 2 additions & 1 deletion gallery/src/components/demo-more-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ class DemoMoreInfo extends LitElement {

@property({ attribute: false }) public entityId!: string;

@property({ attribute: false, type: Boolean }) public showConfig = false;
@property({ attribute: "show-config", type: Boolean })
public showConfig = false;

render() {
const state = this._getState(this.entityId, this.hass.states);
Expand Down
2 changes: 1 addition & 1 deletion hassio/src/backups/hassio-backups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export class HassioBackups extends LitElement {

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

@property({ attribute: false, type: Boolean }) public isWide = false;
@property({ attribute: "is-wide", type: Boolean }) public isWide = false;

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

Expand Down
2 changes: 1 addition & 1 deletion hassio/src/components/hassio-card-content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class HassioCardContent extends LitElement {

@property({ type: Boolean }) public available = true;

@property({ attribute: false, type: Boolean }) public showTopbar = false;
@property({ attribute: false }) public showTopbar = false;

@property({ attribute: false }) public topbarClass?: string;

Expand Down
5 changes: 2 additions & 3 deletions hassio/src/components/supervisor-backup-content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,9 @@ export class SupervisorBackupContent extends LitElement {

@property({ attribute: false }) public addons?: AddonCheckboxItem[];

@property({ attribute: false, type: Boolean }) public homeAssistant = false;
@property({ attribute: false }) public homeAssistant = false;

@property({ attribute: false, type: Boolean }) public backupHasPassword =
false;
@property({ attribute: false }) public backupHasPassword = false;

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

Expand Down
2 changes: 1 addition & 1 deletion hassio/src/ingress-view/hassio-ingress-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class HassioIngressView extends LitElement {

@property({ attribute: false }) public route!: Route;

@property({ attribute: false, type: Boolean }) public ingressPanel = false;
@property({ attribute: false }) public ingressPanel = false;

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

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
"@types/glob": "8.1.0",
"@types/html-minifier-terser": "7.0.2",
"@types/js-yaml": "4.0.9",
"@types/leaflet": "1.9.14",
"@types/leaflet": "1.9.15",
"@types/leaflet-draw": "1.0.11",
"@types/lodash.merge": "4.6.9",
"@types/luxon": "3.4.2",
Expand Down Expand Up @@ -223,7 +223,7 @@
"object-hash": "3.0.0",
"open": "10.1.0",
"pinst": "3.0.0",
"prettier": "3.4.1",
"prettier": "3.4.2",
"rspack-manifest-plugin": "5.0.2",
"serve-handler": "6.1.6",
"sinon": "19.0.2",
Expand Down
2 changes: 1 addition & 1 deletion src/auth/ha-auth-flow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class HaAuthFlow extends LitElement {

@property({ attribute: false }) public step?: DataEntryFlowStep;

@property({ attribute: false, type: Boolean }) public initStoreToken = false;
@property({ attribute: false }) public initStoreToken = false;

@state() private _storeToken = false;

Expand Down
3 changes: 2 additions & 1 deletion src/components/chart/ha-chart-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ export class HaChartBase extends LitElement {

@property({ attribute: false, type: Number }) public paddingYAxis = 0;

@property({ attribute: false, type: Boolean }) public externalHidden = false;
@property({ attribute: "external-hidden", type: Boolean })
public externalHidden = false;

@state() private _chartHeight?: number;

Expand Down
12 changes: 7 additions & 5 deletions src/components/chart/state-history-chart-line.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ export class StateHistoryChartLine extends LitElement {

@property() public identifier?: string;

@property({ attribute: false, type: Boolean }) public showNames = true;
@property({ attribute: "show-names", type: Boolean })
public showNames = true;

@property({ attribute: false, type: Boolean }) public clickForMoreInfo = true;
@property({ attribute: "click-for-more-info", type: Boolean })
public clickForMoreInfo = true;

@property({ attribute: false }) public startTime!: Date;

Expand All @@ -44,14 +46,14 @@ export class StateHistoryChartLine extends LitElement {

@property({ attribute: false, type: Number }) public chartIndex?;

@property({ attribute: false, type: Boolean }) public logarithmicScale =
false;
@property({ attribute: "logarithmic-scale", type: Boolean })
public logarithmicScale = false;

@property({ attribute: false, type: Number }) public minYAxis?: number;

@property({ attribute: false, type: Number }) public maxYAxis?: number;

@property({ attribute: false, type: Boolean }) public fitYData = false;
@property({ attribute: "fit-y-data", type: Boolean }) public fitYData = false;

@state() private _chartData?: ChartData<"line">;

Expand Down
5 changes: 3 additions & 2 deletions src/components/chart/state-history-chart-timeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ export class StateHistoryChartTimeline extends LitElement {

@property() public identifier?: string;

@property({ attribute: false, type: Boolean }) public showNames = true;
@property({ attribute: "show-names", type: Boolean }) public showNames = true;

@property({ attribute: false, type: Boolean }) public clickForMoreInfo = true;
@property({ attribute: "click-for-more-info", type: Boolean })
public clickForMoreInfo = true;

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

Expand Down
14 changes: 8 additions & 6 deletions src/components/chart/state-history-charts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,22 @@ export class StateHistoryCharts extends LitElement {

@property({ attribute: false, type: Number }) public hoursToShow?: number;

@property({ attribute: false, type: Boolean }) public showNames = true;
@property({ attribute: "show-names", type: Boolean }) public showNames = true;

@property({ attribute: false, type: Boolean }) public clickForMoreInfo = true;
@property({ attribute: "click-for-more-info", type: Boolean })
public clickForMoreInfo = true;

@property({ attribute: false, type: Boolean }) public isLoadingData = false;
@property({ attribute: "is-loading-data", type: Boolean })
public isLoadingData = false;

@property({ attribute: false, type: Boolean }) public logarithmicScale =
false;
@property({ attribute: "logarithmic-scale", type: Boolean })
public logarithmicScale = false;

@property({ attribute: false, type: Number }) public minYAxis?: number;

@property({ attribute: false, type: Number }) public maxYAxis?: number;

@property({ attribute: false, type: Boolean }) public fitYData = false;
@property({ attribute: "fit-y-data", type: Boolean }) public fitYData = false;

private _computedStartTime!: Date;

Expand Down
14 changes: 8 additions & 6 deletions src/components/chart/statistics-chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,19 @@ export class StatisticsChart extends LitElement {

@property({ attribute: false, type: Number }) public maxYAxis?: number;

@property({ attribute: false, type: Boolean }) public fitYData = false;
@property({ attribute: "fit-y-data", type: Boolean }) public fitYData = false;

@property({ attribute: "hide-legend", type: Boolean }) public hideLegend =
false;

@property({ attribute: false, type: Boolean }) public logarithmicScale =
false;
@property({ attribute: "logarithmic-scale", type: Boolean })
public logarithmicScale = false;

@property({ attribute: false, type: Boolean }) public isLoadingData = false;
@property({ attribute: "is-loading-data", type: Boolean })
public isLoadingData = false;

@property({ attribute: false, type: Boolean }) public clickForMoreInfo = true;
@property({ attribute: "click-for-more-info", type: Boolean })
public clickForMoreInfo = true;

@property() public period?: string;

Expand Down Expand Up @@ -165,7 +167,7 @@ export class StatisticsChart extends LitElement {

return html`
<ha-chart-base
externalHidden
external-hidden
.hass=${this.hass}
.data=${this._chartData}
.extraData=${this._chartDatasetExtra}
Expand Down
2 changes: 1 addition & 1 deletion src/components/data-table/ha-data-table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export class HaDataTable extends LitElement {

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

@property({ attribute: false, type: Boolean }) public hasFab = false;
@property({ attribute: "has-fab", type: Boolean }) public hasFab = false;

/**
* Add an extra row at the bottom of the data table
Expand Down
3 changes: 2 additions & 1 deletion src/components/entity/ha-entity-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ export class HaEntityPicker extends LitElement {
@property({ attribute: false })
public entityFilter?: HaEntityPickerEntityFilterFunc;

@property({ attribute: false, type: Boolean }) public hideClearIcon = false;
@property({ attribute: "hide-clear-icon", type: Boolean })
public hideClearIcon = false;

@property({ attribute: "item-label-path" }) public itemLabelPath =
"friendly_name";
Expand Down
2 changes: 1 addition & 1 deletion src/components/entity/ha-state-label-badge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class HaStateLabelBadge extends LitElement {

@property() public image?: string;

@property({ attribute: false, type: Boolean }) public showName = false;
@property({ attribute: "show-name", type: Boolean }) public showName = false;

@state() private _timerTimeRemaining?: number;

Expand Down
6 changes: 3 additions & 3 deletions src/components/entity/state-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class StateInfo extends LitElement {

@property({ attribute: false }) public stateObj?: HassEntity;

@property({ attribute: false, type: Boolean }) public inDialog = false;
@property({ attribute: "in-dialog", type: Boolean }) public inDialog = false;

@property() public color?: string;

Expand All @@ -32,7 +32,7 @@ class StateInfo extends LitElement {
.color=${this.color}
></state-badge>
<div class="info">
<div class="name" .title=${name} .inDialog=${this.inDialog}>
<div class="name ${this.inDialog ? "in-dialog" : ""}" .title=${name}>
${name}
</div>
${this.inDialog
Expand Down Expand Up @@ -108,7 +108,7 @@ class StateInfo extends LitElement {
text-overflow: ellipsis;
}
.name[inDialog],
.name.in-dialog,
:host([secondary-line]) .name {
line-height: 20px;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/ha-assist-pipeline-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class HaAssistPipelinePicker extends LitElement {

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

@property({ attribute: false, type: Boolean }) public includeLastUsed = false;
@property({ attribute: false }) public includeLastUsed = false;

@state() _pipelines?: AssistPipeline[];

Expand Down
14 changes: 9 additions & 5 deletions src/components/ha-base-time-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class HaBaseTimeInput extends LitElement {
/**
* auto validate time inputs
*/
@property({ attribute: false, type: Boolean }) autoValidate = false;
@property({ attribute: "auto-validate", type: Boolean }) autoValidate = false;

/**
* determines if inputs are required
Expand Down Expand Up @@ -106,22 +106,26 @@ export class HaBaseTimeInput extends LitElement {
/**
* show the sec field
*/
@property({ attribute: false, type: Boolean }) enableSecond = false;
@property({ attribute: "enable-second", type: Boolean })
public enableSecond = false;

/**
* show the milli sec field
*/
@property({ attribute: false, type: Boolean }) enableMillisecond = false;
@property({ attribute: "enable-millisecond", type: Boolean })
public enableMillisecond = false;

/**
* show the day field
*/
@property({ attribute: false, type: Boolean }) enableDay = false;
@property({ attribute: "enable-day", type: Boolean })
public enableDay = false;

/**
* limit hours input
*/
@property({ attribute: false, type: Boolean }) noHoursLimit = false;
@property({ attribute: "no-hours-limit", type: Boolean })
public noHoursLimit = false;

/**
* AM or PM
Expand Down
3 changes: 2 additions & 1 deletion src/components/ha-button-toggle-group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ export class HaButtonToggleGroup extends LitElement {

@property() public active?: string;

@property({ attribute: false, type: Boolean }) public fullWidth = false;
@property({ attribute: "full-width", type: Boolean })
public fullWidth = false;

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

Expand Down
5 changes: 3 additions & 2 deletions src/components/ha-clickable-list-item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import { HaListItem } from "./ha-list-item";
export class HaClickableListItem extends HaListItem {
@property() public href?: string;

@property({ attribute: false, type: Boolean }) public disableHref = false;
@property({ attribute: "disable-href", type: Boolean })
public disableHref = false;

@property({ attribute: false, type: Boolean, reflect: true })
@property({ attribute: "open-new-tab", type: Boolean, reflect: true })
public openNewTab = false;

@query("a") private _anchor!: HTMLAnchorElement;
Expand Down
2 changes: 1 addition & 1 deletion src/components/ha-country-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ export class HaCountryPicker extends LitElement {

@property({ type: Boolean, reflect: true }) public disabled = false;

@property({ attribute: false, type: Boolean }) public noSort = false;
@property({ attribute: "no-sort", type: Boolean }) public noSort = false;

private _getOptions = memoizeOne(
(language?: string, countries?: string[]) => {
Expand Down
Loading

0 comments on commit 7f4186c

Please sign in to comment.