We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1faaaa6 commit 7b9ca05Copy full SHA for 7b9ca05
1 file changed
custom_components/makerspaceapi/sensor.py
@@ -118,7 +118,6 @@ class BookingTargetSensor(MakerSpaceEntity, SensorEntity):
118
_attr_state_class = SensorStateClass.MEASUREMENT
119
_attr_native_unit_of_measurement = CURRENCY_EURO
120
_attr_suggested_display_precision = 2
121
- _attr_icon = "mdi:cash"
122
123
def __init__(
124
self, coordinator: MakerSpaceCoordinator, entry: ConfigEntry, slug: str
@@ -143,7 +142,7 @@ def icon(self) -> str:
143
142
t = self._target()
144
if not t:
145
return "mdi:cash-sync"
146
- return "mdi:cash" if t["balance"] > 0 else "mdi:cash-off"
+ return "mdi:cash" if float(t["balance"]) > 0 else "mdi:cash-off"
147
148
@property
149
def native_value(self) -> float | None:
0 commit comments