Tile showing "NaN" on true/false attributes
Xitee1 opened this issue · comments
Checklist
- I have updated the card to the latest version available
- I have cleared the cache of my browser
- I have checked if the problem is already reported
The problem
When using an entity with attribute and the attribute is either true or false the tile only shows "NaN". Other attributes with values are not affected.
I have a Roomba, but just for testing I tried other entities (contact sensor) that also has an attribute that is only true/false, indicating if there is contact. That also only shows NaN. All other attributes like battery percentage (numeric) do work.
I also tried it with quotes and different combinations. Nothing does work.
What version of a card has described problem?
v2.1.2
What was the last working version card?
No response
What vacuum model do you have problems with?
Roomba
Which integration do you use to control your vacuum (link)?
https://www.home-assistant.io/integrations/roomba/
What browser (browsers/apps) does have this problem?
Chrome, Firefox
What version of Home Assistant do you use?
2023.4.6
What type of installation are you running?
Home Assistant OS
Card's configuration
type: custom:xiaomi-vacuum-map-card
entity: vacuum.roomba
vacuum_platform: Roomba
map_source:
camera: camera.roomba_karte
calibration_source:
identity: true
tiles:
- tile_id: status
entity: vacuum.roomba
label: Status
attribute: status
icon: mdi:robot-vacuum
translations:
starting: Startet
charger disconnected: Charger disconnected
idle: Untätig
remote control active: Remote control active
cleaning: Saugen
returning home: Kehrt zurück
manual mode: Manueller Modus
charging: Laden
charging problem: Charging problem
paused: Paused
spot cleaning: Spot cleaning
error: Fehler
shutting down: Shutting down
updating: Updating
docking: Dockt an
going to target: Going to target
zoned cleaning: Zoned cleaning
segment cleaning: Segment cleaning
emptying the bin: Emptying the bin
charging complete: Aufgeladen
device offline: Offline
- tile_id: battery_level
entity: vacuum.roomba
label: Akku
attribute: battery_level
icon: mdi:battery-charging-100
unit: '%'
- tile_id: fan_speed
entity: vacuum.roomba
label: Saugstärke
attribute: fan_speed
icon: mdi:fan
translations:
eco: Normal
performance: Stark
automatic: Auto
- tile_id: bin_present
attribute: bin_present
label: Auffangbehälter
icon: mdi:delete-restore
entity: vacuum.roomba
translations:
'true': Vorhanden
'false': Nicht vorhanden
- tile_id: bin_full
label: Auffangbehälter
icon: mdi:delete
entity: vacuum.roomba
attribute: bin_full
translations:
'true': Voll
'false': Geleert
- tile_id: cleaned_hours
entity: sensor.roomba_cleaning_time_total
label: Gesamte Saugzeit
unit: ' Stunden'
- tile_id: total_missions
entity: sensor.roomba_missions_total
label: Missionen
- tile_id: scrubs
entity: sensor.roomba_scrubs_count
label: Dreck zähler
icons:
- icon: mdi:play
conditions:
- entity: vacuum.roomba
value_not: cleaning
- entity: vacuum.roomba
value_not: error
- entity: vacuum.roomba
value_not: returning
tooltip: Start
tap_action:
action: call-service
service: vacuum.start
service_data:
entity_id: vacuum.roomba
- icon: mdi:pause
conditions:
- entity: vacuum.roomba
value_not: docked
- entity: vacuum.roomba
value_not: idle
- entity: vacuum.roomba
value_not: error
- entity: vacuum.roomba
value_not: paused
tooltip: Pause
tap_action:
action: call-service
service: vacuum.pause
service_data:
entity_id: vacuum.roomba
- icon: mdi:stop
conditions:
- entity: vacuum.roomba
value_not: docked
- entity: vacuum.roomba
value_not: idle
- entity: vacuum.roomba
value_not: error
- entity: vacuum.roomba
value_not: paused
tooltip: Stop
tap_action:
action: call-service
service: vacuum.stop
service_data:
entity_id: vacuum.roomba
- icon: mdi:home-map-marker
conditions:
- entity: vacuum.roomba
value_not: docked
- entity: vacuum.roomba
value_not: returning
tooltip: Zurück zur Station
tap_action:
action: call-service
service: vacuum.return_to_base
service_data:
entity_id: vacuum.roomba
- icon: mdi:map-marker
tooltip: Finden
tap_action:
action: call-service
service: vacuum.locate
service_data:
entity_id: vacuum.roomba
- icon: mdi:fan-alert
conditions:
- entity: vacuum.roomba
attribute: fan_speed
value: Automatic
tooltip: Saugstärke ändern
tap_action:
action: call-service
service: vacuum.set_fan_speed
service_data:
entity_id: vacuum.roomba
fan_speed: Eco
- icon: mdi:fan-alert
conditions:
- entity: vacuum.roomba
attribute: fan_speed
value: Eco
tooltip: Saugstärke ändern
tap_action:
action: call-service
service: vacuum.set_fan_speed
service_data:
entity_id: vacuum.roomba
fan_speed: Performance
- icon: mdi:fan-alert
conditions:
- entity: vacuum.roomba
attribute: fan_speed
value: Performance
tooltip: Saugstärke ändern
tap_action:
action: call-service
service: vacuum.set_fan_speed
service_data:
entity_id: vacuum.roomba
fan_speed: Automatic
- icon: mdi:fan-alert
conditions:
- entity: vacuum.roomba
attribute: fan_speed
value_not: Automatic
- entity: vacuum.roomba
attribute: fan_speed
value_not: Eco
- entity: vacuum.roomba
attribute: fan_speed
value_not: Performance
tooltip: Change fan speed
tap_action:
action: call-service
service: vacuum.set_fan_speed
service_data:
entity_id: vacuum.roomba
fan_speed: Automatic
map_modes: []
two_finger_pan: true
title: Roomba
Javascript errors shown in the browser's console (if applicable)
I don't think they are related but I got two errors.
Sadly in Chrome I can't properly copy them and in Firefox I can copy them but can't set the language to english.. sorry for that.
Laden des Moduls von "http://homeassistant.local:8123/webrtc/webrtc-camera.js?v2.3.1" wurde auf Grund eines nicht freigegebenen MIME-Typs ("text/plain") blockiert. steuerung
Uncaught (in promise) http://homeassistant.local:8123/webrtc/webrtc-camera.js?v2.3.1
Additional information
No response
Does following config work?
type: custom:xiaomi-vacuum-map-card
entity: vacuum.roomba
vacuum_platform: Roomba
map_source:
camera: camera.roomba_karte
calibration_source:
identity: true
map_modes: []
two_finger_pan: true
title: Roomba