diff --git a/custom_components/nicehash/nicehash.py b/custom_components/nicehash/nicehash.py index ba6a20a..95fe8ca 100644 --- a/custom_components/nicehash/nicehash.py +++ b/custom_components/nicehash/nicehash.py @@ -64,8 +64,8 @@ class Payout: self.id = data.get("id") self.currency = "Unknown" self.created = data.get("created") - self.amount = data.get("amount") - self.fee = data.get("feeAmount") + self.amount = float(data.get("amount")) + self.fee = float(data.get("feeAmount")) self.account_type = "Unknown" # Currency currency = data.get("currency") diff --git a/custom_components/nicehash/payout_sensors.py b/custom_components/nicehash/payout_sensors.py index b895442..ff71913 100644 --- a/custom_components/nicehash/payout_sensors.py +++ b/custom_components/nicehash/payout_sensors.py @@ -83,7 +83,7 @@ class RecentMiningPayoutSensor(Entity): self._amount = 0.00 self._fee = 0.00 - return self._amount + return self._amount - self._fee @property def icon(self):