Skip to content

Commit

Permalink
Fix refresh in developer state tools (#18532)
Browse files Browse the repository at this point in the history
  • Loading branch information
silamon authored Nov 6, 2023
1 parent 3d03f74 commit a7f6ce3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/panels/developer-tools/state/developer-tools-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ class HaPanelDevState extends LitElement {
)}</mwc-button
>
<ha-icon-button
@click=${this._entityIdChanged}
@click=${this._updateEntity}
.label=${this.hass.localize("ui.common.refresh")}
.path=${mdiRefresh}
></ha-icon-button>
Expand Down Expand Up @@ -349,6 +349,10 @@ class HaPanelDevState extends LitElement {

private _entityIdChanged(ev: CustomEvent) {
this._entityId = ev.detail.value;
this._updateEntity();
}

private _updateEntity() {
if (!this._entityId) {
this._entity = undefined;
this._state = "";
Expand Down

0 comments on commit a7f6ce3

Please sign in to comment.