Skip to content

Commit

Permalink
Review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
silamon committed Oct 9, 2023
1 parent 84fe09f commit e4a4d6b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/panels/developer-tools/state/developer-tools-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ import {
} from "@mdi/js";
import { CSSResultGroup, LitElement, css, html, nothing } from "lit";
import { customElement, property, state } from "lit/decorators";
import {
HassEntity,
HassEntityAttributeBase,
} from "home-assistant-js-websocket";
import { formatDateTimeWithSeconds } from "../../../common/datetime/format_date_time";
import { computeRTL } from "../../../common/util/compute_rtl";
import { escapeRegExp } from "../../../common/string/escape_regexp";
Expand Down Expand Up @@ -40,13 +44,15 @@ class HaPanelDevState extends LitElement {

@state() private _attributeFilter: string = "";

@state() private _entity?: object;
@state() private _entity?: HassEntity;

@state() private _state: string = "";

@state() private _stateAttributes: object = {};
@state() private _stateAttributes: HassEntityAttributeBase & {
[key: string]: any;
} = {};

@state() private _expanded: boolean = false;
@state() private _expanded = false;

@state() private _validJSON: boolean = true;

Expand Down Expand Up @@ -304,7 +310,7 @@ class HaPanelDevState extends LitElement {
}

private _entitySelected(ev) {
const entityState = (ev.currentTarget! as any).entity;
const entityState: HassEntity = (ev.currentTarget! as any).entity;
this._entityId = entityState.entity_id;
this._entity = entityState;
this._state = entityState.state;
Expand Down

0 comments on commit e4a4d6b

Please sign in to comment.