Skip to content

Commit

Permalink
pylib: Add 'idle_time' capability
Browse files Browse the repository at this point in the history
Only set if a device has both getIdleTime and setIdleTime, this is
replacing the two separate capabilities that were present until now.
  • Loading branch information
z3ntu committed Apr 28, 2024
1 parent e4f6652 commit e460423
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pylib/openrazer/client/devices/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ def __init__(self, serial, vid_pid=None, daemon_dbus=None):
'brightness': self._has_feature('razer.device.lighting.brightness'),

'battery': self._has_feature('razer.device.power', 'getBattery'),
'idle_time': self._has_feature('razer.device.power', ('getIdleTime', 'setIdleTime')),
# Deprecated, use idle_time
'get_idle_time': self._has_feature('razer.device.power', 'getIdleTime'),
'set_idle_time': self._has_feature('razer.device.power', 'setIdleTime'),
'get_low_battery_threshold': self._has_feature('razer.device.power', 'getLowBatteryThreshold'),
Expand Down

0 comments on commit e460423

Please sign in to comment.