Open realzoulou opened 1 week ago
@realzoulou what behavior would you prefer? Ignore items without lat/long? The current idea is to give a quick error.
@nathan-gs
Imho the card should post a message in console & show available entities.
If none of them can be shown -> show a home
position.
Use case:
Assume there are meteorological data (temperature, pressure) provided by some integrations; and sensors have latitude/longitude.
Then I would add on a card zone.my_castle
& sensors with meteo data in this region.
Due to some reasons, this meteo integration does not create a sensor (or it becomes unavailable) -> a card does not show available data (or at least my castle).
@nathan-gs I would not necessarily need to see any error message indicating a sensor is not available. But agree with @ildar170975 that for some use cases it would be beneficial to get some sort of indication about why the card is not showing expected data.
I would choose a "log a message to console" - but a user (esp. a beginner) may not notice it if a Code inspector (or whatever it is called in a particular browser) is not shown. Another way could be displaying an error badge on a map - here is a poor mockup made in MS Paint: with a tooltip like "Some errors, check browser's console for details".
Issue description: When device_tracker has state
Unavailable
, no map is drawn at allExpected: Map is drawn still but without the unavailable device_trackers (same behavior as with the HA included Map Card)
Symptom: ha-map-card shows "Error found in first run. check Console" Console highlights map-card.js line https://github.com/nathan-gs/ha-map-card/blob/1cd63018e7a8723f6da54b29b62505471a033915/src/components/MapCard.js#L240
map card configuration: