Skip to content

Commit

Permalink
Merge pull request #897 from tomvanswam/fix-895
Browse files Browse the repository at this point in the history
v2.0.1
  • Loading branch information
tomvanswam authored Nov 18, 2024
2 parents 803da41 + 1c1c6ba commit 5fc9af0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
4 changes: 4 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ services:
- ./ha/config:/config
- ./ha/run:/etc/services.d/home-assistant/run
network_mode: host
ports:
- 8123:8123
environment:
- PUID=${UID}
- PGID=${GID}
Expand All @@ -20,6 +22,8 @@ services:
image: mcr.microsoft.com/devcontainers/typescript-node:latest
command: /bin/sh -c "while sleep 1000; do :; done"
working_dir: /home/node/app
ports:
- 5000:5000
environment:
- NODE_ENV=development
- TERM="xterm-256color"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "compass-card",
"version": "2.0.0'",
"version": "2.0.1'",
"description": "Lovelace compass-card",
"keywords": [
"home-assistant",
Expand Down
13 changes: 6 additions & 7 deletions src/compass-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,8 @@ export class CompassCard extends LitElement {
}

private svgCircle(directionOffset: number): SVGTemplateResult {
return svg`<circle class="circle" cx="76" cy="76" r="62" stroke="${this.getColor(this.compass.circle)}" stroke-width="2" fill="${this.circleFill()}" fill-opacity="${
this.compass.circle.background_opacity
}" stroke-opacity="1.0" transform="rotate(${directionOffset},76,76)" />`;
return svg`<circle class="circle" cx="76" cy="76" r="62" stroke="${this.getColor(this.compass.circle)}" stroke-width="2" fill="${this.circleFill()}" fill-opacity="${this.compass.circle.background_opacity
}" stroke-opacity="1.0" transform="rotate(${directionOffset},76,76)" />`;
}

private circleFill(): string {
Expand Down Expand Up @@ -332,8 +331,8 @@ export class CompassCard extends LitElement {
return svg`
<g class="circle">
<path d="m76 5.8262a9.1809 9.1809 0 0 0-0.0244 0 9.1809 9.1809 0 0 0-9.1813 9.18 9.1809 9.1809 0 0 0 9.1813 9.1813 9.1809 9.1809 0 0 0 0.0244 0z" fill="${this.getColor(
indicatorSensor.indicator,
)}"/>
indicatorSensor.indicator,
)}"/>
<path d="m76 5.8262v18.361a9.1809 9.1809 0 0 0 9.1556-9.1813 9.1809 9.1809 0 0 0-9.1556-9.18z" fill="${this.getColor(indicatorSensor.indicator)}"/>
<path d="m76 5.8262v18.361a9.1809 9.1809 0 0 0 9.1556-9.1813 9.1809 9.1809 0 0 0-9.1556-9.18z" fill="white" opacity="0.5"/>
</g>
Expand Down Expand Up @@ -437,8 +436,8 @@ export class CompassCard extends LitElement {
}

static getDegrees(abbrevation: string): number {
if (COMPASS_POINTS[abbrevation]) {
return COMPASS_POINTS[abbrevation];
if (COMPASS_POINTS[abbrevation.toUpperCase()]) {
return COMPASS_POINTS[abbrevation.toUpperCase()];
}
return -1;
}
Expand Down
2 changes: 1 addition & 1 deletion src/const.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { localize } from './localize/localize';

export const CARD_VERSION = '2.0.0';
export const CARD_VERSION = '2.0.1';
export const ICONS = {
compass: 'mdi:compass',
};
Expand Down

0 comments on commit 5fc9af0

Please sign in to comment.