Skip to content

Commit

Permalink
Make name/icon clickable to open entity popover. Fixes #31
Browse files Browse the repository at this point in the history
  • Loading branch information
nervetattoo committed Mar 9, 2019
1 parent 4495218 commit e8c0b4f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ class SimpleThermostat extends LitElement {
>
</paper-icon-button>
<div @click="${() => this.openEntityPopover(config.entity)}">
<div @click=${() => this.openEntityPopover()}>
<h3 class="current--value">
${formatNumber(value)}
</h3>
Expand Down Expand Up @@ -293,7 +293,7 @@ class SimpleThermostat extends LitElement {
}

return html`
<header>
<header class="clickable" @click=${() => this.openEntityPopover()}>
${(icon &&
html`
<ha-icon class="header__icon" .icon=${icon}></ha-icon>
Expand Down Expand Up @@ -432,7 +432,7 @@ class SimpleThermostat extends LitElement {
}
}

openEntityPopover(entityId) {
openEntityPopover(entityId = this.config.entity) {
this.fire('hass-more-info', { entityId })
}

Expand Down
2 changes: 1 addition & 1 deletion src/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export function renderStyles() {
.sensors td {
padding-bottom: 4px;
}
.sensors td.clickable {
.clickable {
cursor: pointer;
}
.modes {
Expand Down

0 comments on commit e8c0b4f

Please sign in to comment.