Skip to content

Commit

Permalink
Energy CSV download should not require admin
Browse files Browse the repository at this point in the history
  • Loading branch information
karwosts committed May 2, 2024
1 parent deda200 commit 6f30553
Showing 1 changed file with 16 additions and 20 deletions.
36 changes: 16 additions & 20 deletions src/panels/energy/ha-panel-energy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,27 +88,23 @@ class PanelEnergy extends LitElement {
collectionKey="energy_dashboard"
>
${this.hass.user?.is_admin
? html`
<ha-list-item
slot="overflow-menu"
graphic="icon"
@request-selected=${this._navigateConfig}
>
<ha-svg-icon slot="graphic" .path=${mdiPencil}>
</ha-svg-icon>
${this.hass!.localize("ui.panel.energy.configure")}
</ha-list-item>
<ha-list-item
slot="overflow-menu"
graphic="icon"
@request-selected=${this._dumpCSV}
>
<ha-svg-icon slot="graphic" .path=${mdiDownload}>
</ha-svg-icon>
${this.hass!.localize("ui.panel.energy.download_data")}
</ha-list-item>
`
? html` <ha-list-item
slot="overflow-menu"
graphic="icon"
@request-selected=${this._navigateConfig}
>
<ha-svg-icon slot="graphic" .path=${mdiPencil}> </ha-svg-icon>
${this.hass!.localize("ui.panel.energy.configure")}
</ha-list-item>`
: nothing}
<ha-list-item
slot="overflow-menu"
graphic="icon"
@request-selected=${this._dumpCSV}
>
<ha-svg-icon slot="graphic" .path=${mdiDownload}> </ha-svg-icon>
${this.hass!.localize("ui.panel.energy.download_data")}
</ha-list-item>
</hui-energy-period-selector>
</div>
</div>
Expand Down

0 comments on commit 6f30553

Please sign in to comment.