Skip to content

Commit

Permalink
Merge pull request #611 from greghesp/main
Browse files Browse the repository at this point in the history
Merge fixes that targeted main back into develop.
  • Loading branch information
AdrianGarside authored Oct 21, 2024
2 parents e9807f1 + 1e1d863 commit 8474191
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions custom_components/bambu_lab/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ def _update_print_error(self):
"type": "event_printer_error_cleared",
}
#LOGGER.debug(f"EVENT: print_error cleared: {event_data}")
if 'Code' in device.print_error.errors:
event_data["Code"] = device.print_error.errors['Code']
if 'Code' in device.print_error.error:
event_data["Code"] = device.print_error.error['Code']
else:
event_data = {
"device_id": hadevice.id,
Expand Down
5 changes: 4 additions & 1 deletion custom_components/bambu_lab/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ def __init__(
"""Initialize the fan."""
self.entity_description = description
self._attr_unique_id = f"{config_entry.data['serial']}_{description.key}"
self._attr_supported_features = FanEntityFeature.SET_SPEED
self._attr_supported_features = (
FanEntityFeature.SET_SPEED
| FanEntityFeature.TURN_ON
| FanEntityFeature.TURN_OFF)

super().__init__(coordinator=coordinator)

Expand Down

0 comments on commit 8474191

Please sign in to comment.