mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-26 10:46:35 +00:00
Show energy-self-sufficiency-gauge card without grid return (#24098)
Show energy-self-sufficiency-gauge card if solar is defined
This commit is contained in:
parent
16181b48ae
commit
de3bf2e088
@ -140,12 +140,14 @@ export class EnergyViewStrategy extends ReactiveElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Only include if we have a solar source.
|
// Only include if we have a solar source.
|
||||||
if (hasSolar && hasReturn) {
|
if (hasSolar) {
|
||||||
|
if (hasReturn) {
|
||||||
view.cards!.push({
|
view.cards!.push({
|
||||||
type: "energy-solar-consumed-gauge",
|
type: "energy-solar-consumed-gauge",
|
||||||
view_layout: { position: "sidebar" },
|
view_layout: { position: "sidebar" },
|
||||||
collection_key: "energy_dashboard",
|
collection_key: "energy_dashboard",
|
||||||
});
|
});
|
||||||
|
}
|
||||||
view.cards!.push({
|
view.cards!.push({
|
||||||
type: "energy-self-sufficiency-gauge",
|
type: "energy-self-sufficiency-gauge",
|
||||||
view_layout: { position: "sidebar" },
|
view_layout: { position: "sidebar" },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user