Skip to content

Commit

Permalink
Fix direction offset
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvanswam committed Sep 19, 2020
1 parent 4425105 commit f03f61b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/compass-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ export class CompassCard extends LitElement {
};

const direction: HassEntity = this.hass.states[this._config?.entity];
const directionOffset = !Number.isNaN(Number(this._config.directionOffset)) ? CompassCard.positiveDegrees(+this._config.directionOffset) : 0;
const directionOffset = !Number.isNaN(Number(this._config.direction_offset)) ? CompassCard.positiveDegrees(+this._config.direction_offset) : 0;
console.log(this._config.directionOffset);

const label = direction ? direction.attributes.friendly_name : this._config.entity;

Expand Down

0 comments on commit f03f61b

Please sign in to comment.