Skip to content

Commit

Permalink
Add device attribute to features available check
Browse files Browse the repository at this point in the history
  • Loading branch information
fustom committed Sep 13, 2023
1 parent 8ec0e81 commit 7c0b717
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ariston/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ def _set_energy_features(self):

def are_device_features_available(
self,
device_features: Optional[list[DeviceFeatures]],
device_features: Optional[list[DeviceFeatures or CustomDeviceFeatures or DeviceAttribute]],
system_types: Optional[list[SystemType]],
whe_types: Optional[list[WheType]],
) -> bool:
Expand All @@ -380,6 +380,7 @@ def are_device_features_available(
if (
self.features.get(str(device_feature)) is not True
and self.custom_features.get(str(device_feature)) is not True
and self.attributes.get(str(device_feature)) is not True
):
return False

Expand Down

0 comments on commit 7c0b717

Please sign in to comment.