diff --git a/CHANGELOG.md b/CHANGELOG.md index a149e9b..9ef004a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,10 @@ as of version 2.1.1. ### Changed - Changed the build system from poetry-core to setuptools. - Changed the VCPCode type to use class attributes instead of property functions. +- Changed enums from `enum.Enum` to `enum.IntEnum`: + - `ColorPreset` + - `PowerMode` + - `InputSource` ### Removed - Removed support for end-of-life python version 3.8. diff --git a/monitorcontrol/monitorcontrol.py b/monitorcontrol/monitorcontrol.py index b7e5778..d5157e9 100644 --- a/monitorcontrol/monitorcontrol.py +++ b/monitorcontrol/monitorcontrol.py @@ -6,7 +6,7 @@ @enum.unique -class ColorPreset(enum.Enum): +class ColorPreset(enum.IntEnum): """Monitor color presets.""" COLOR_TEMP_4000K = 0x03 @@ -23,7 +23,7 @@ class ColorPreset(enum.Enum): @enum.unique -class PowerMode(enum.Enum): +class PowerMode(enum.IntEnum): """Monitor power modes.""" #: On. @@ -39,7 +39,7 @@ class PowerMode(enum.Enum): @enum.unique -class InputSource(enum.Enum): +class InputSource(enum.IntEnum): """Monitor input sources.""" OFF = 0x00