tomvanswam / compass-card

A Lovelace card that shows a directional indicator on a compass for Home Assistant
MIT License
172 stars 19 forks source link

Direction not shown correctly (Netatmo) #895

Open dabenzel opened 2 weeks ago

dabenzel commented 2 weeks ago

Checklist:

Release with the issue: Compass-Card 2.0.0 / HomeAssistant 2024.8 and 2024.9

Last working release (if known):

Browser and Operating System:

Arc (also HASS-APP on iOS18), Windows

Description of problem:

Direction not correctly shown in Card. image

Javascript errors shown in the web inspector (if applicable): Appears after some time

compass-card.js?hacstag=286038496200:70 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'attributes')
    at compass-card.js?hacstag=286038496200:70:24775
    at ti (compass-card.js?hacstag=286038496200:70:25337)
    at header.entities.i (compass-card.js?hacstag=286038496200:1043:3064)
    at qn.updateConfig (compass-card.js?hacstag=286038496200:1043:3482)
    at set hass (compass-card.js?hacstag=286038496200:1043:1518)
    at i.value (hui-card.ts:99:21)
    at i.value (hui-card.ts:155:18)
    at i.performUpdate (reactive-element.ts:1329:14)
    at i.scheduleUpdate (reactive-element.ts:1261:17)
    at i._$Ej (reactive-element.ts:1233:25)

YAML config or the card with the bug:

type: custom:compass-card
indicator_sensors:
  - sensor: sensor.windmesser_direction
value_sensors:
  - sensor: sensor.windmesser_gust_strength
header:
  title:
    value: Wind
language: en

Screenshots of the Developer Tools page, State tab: image

options:
  - "n"
  - ne
  - e
  - se
  - s
  - sw
  - w
  - nw
attribution: Data provided by Netatmo
device_class: enum
friendly_name: Windmesser Windrichtung

Additional information:

{
    "sensor.windmesser_direction": {
        "entity_id": "sensor.windmesser_direction",
        "state": "ne",
        "attributes": {
            "options": [
                "n",
                "ne",
                "e",
                "se",
                "s",
                "sw",
                "w",
                "nw"
            ],
            "attribution": "Data provided by Netatmo",
            "device_class": "enum",
            "friendly_name": "Windmesser Windrichtung"
        },
        "context": {
            "id": "xxxxx",
            "parent_id": null,
            "user_id": null
        },
        "last_changed": "2024-09-05T11:45:18.888Z",
        "last_updated": "2024-09-05T11:45:18.888Z"
    },
    "sensor.windmesser_gust_strength": {
        "entity_id": "sensor.windmesser_gust_strength",
        "state": "16",
        "attributes": {
            "state_class": "measurement",
            "unit_of_measurement": "km/h",
            "attribution": "Data provided by Netatmo",
            "device_class": "wind_speed",
            "friendly_name": "Windmesser Böenstärke"
        },
        "context": {
            "id": "xxxxxx",
            "parent_id": null,
            "user_id": null
        },
        "last_changed": "2024-09-05T12:22:18.420Z",
        "last_updated": "2024-09-05T12:22:18.420Z"
    }
}
AdamGit69 commented 1 week ago

Same issue here. Have tried clearing cache, everything is updated and no joy getting it to display correctly.

tomvanswam commented 1 week ago

Same issue here. Have tried clearing cache, everything is updated and no joy getting it to display correctly.

Also using the Netatmo integration?

AdamGit69 commented 1 week ago

Yup also using Netatmo integration.