mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Fix statistics-picker filter when no entity selected (#15659)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
parent
98e21370fd
commit
1741b051fc
@ -74,6 +74,9 @@ class HaStatisticsPicker extends LitElement {
|
||||
const includeUnitClassCurrent = ignoreRestriction
|
||||
? undefined
|
||||
: this.includeUnitClass;
|
||||
const includeDeviceClassCurrent = ignoreRestriction
|
||||
? undefined
|
||||
: this.includeDeviceClass;
|
||||
const includeStatisticTypesCurrent = ignoreRestriction
|
||||
? undefined
|
||||
: this.statisticTypes;
|
||||
@ -87,6 +90,7 @@ class HaStatisticsPicker extends LitElement {
|
||||
.hass=${this.hass}
|
||||
.includeStatisticsUnitOfMeasurement=${includeStatisticsUnitCurrent}
|
||||
.includeUnitClass=${includeUnitClassCurrent}
|
||||
.includeDeviceClass=${includeDeviceClassCurrent}
|
||||
.value=${statisticId}
|
||||
.statisticTypes=${includeStatisticTypesCurrent}
|
||||
.statisticIds=${this.statisticIds}
|
||||
|
@ -121,7 +121,9 @@ export class HuiStatisticsGraphCardEditor
|
||||
!deepEqual(this._configEntities, changedProps.get("_configEntities"))
|
||||
) {
|
||||
this._metaDatas = undefined;
|
||||
this._getStatisticsMetaData(this._configEntities);
|
||||
if (this._configEntities?.length) {
|
||||
this._getStatisticsMetaData(this._configEntities);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user