mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-06 10:44:04 +00:00
Expose reboot action (#1073)
Expose reboot through the feature interface. This can be useful in situations where one wants to reboot the device, e.g., in recent cases where frequent update calls will render the device unresponsive after a specific amount of time.
This commit is contained in:
@@ -439,6 +439,18 @@ class SmartDevice(Device):
|
||||
)
|
||||
)
|
||||
|
||||
self._add_feature(
|
||||
Feature(
|
||||
device=self,
|
||||
id="reboot",
|
||||
name="Reboot",
|
||||
attribute_setter="reboot",
|
||||
icon="mdi:restart",
|
||||
category=Feature.Category.Debug,
|
||||
type=Feature.Type.Action,
|
||||
)
|
||||
)
|
||||
|
||||
for module in self.modules.values():
|
||||
module._initialize_features()
|
||||
for feat in module._module_features.values():
|
||||
|
Reference in New Issue
Block a user