Skip to content

Commit

Permalink
fix: Fixed smart charge sensor always being off - Thanks @HLFCode for…
Browse files Browse the repository at this point in the history
… your assistance (15 minutes dev time)
  • Loading branch information
BottlecapDave committed Oct 4, 2024
1 parent b487751 commit 4ae5d69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/octopus_energy/api_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1086,7 +1086,7 @@ async def async_get_intelligent_settings(self, account_id: str, device_id: str):

devices = list(response_body["data"]["devices"])
if len(devices) == 1:
smart_charge = devices[0]["status"]["isSuspended"] == 'false' if "status" in devices[0] and "isSuspended" in devices[0]["status"] else None
smart_charge = devices[0]["status"]["isSuspended"] == False if "status" in devices[0] and "isSuspended" in devices[0]["status"] else None
charging_preferences = devices[0]["chargingPreferences"] if "chargingPreferences" in devices[0] else None
return IntelligentSettings(
smart_charge,
Expand Down

0 comments on commit 4ae5d69

Please sign in to comment.