From e502cd758684ad88d29d196eaee9cf416d11181d Mon Sep 17 00:00:00 2001 From: Martin Reurekas Date: Sun, 28 Dec 2025 22:44:57 +0100 Subject: [PATCH] added RoonClientTrigger --- cpu_governor_auto_adjust.xml | 2 +- cpu_governor_auto_adjust/mapping.py | 13 +++++++++++-- cpu_governor_auto_adjust/triggers/__init__.py | 3 ++- cpu_governor_auto_adjust/triggers/roon_client.py | 7 +++++++ pyproject.toml | 2 +- 5 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 cpu_governor_auto_adjust/triggers/roon_client.py diff --git a/cpu_governor_auto_adjust.xml b/cpu_governor_auto_adjust.xml index ee66a1c..5cd4aa1 100644 --- a/cpu_governor_auto_adjust.xml +++ b/cpu_governor_auto_adjust.xml @@ -19,7 +19,7 @@ roon - Info + Debug 1 performance diff --git a/cpu_governor_auto_adjust/mapping.py b/cpu_governor_auto_adjust/mapping.py index 382bfba..66ab638 100644 --- a/cpu_governor_auto_adjust/mapping.py +++ b/cpu_governor_auto_adjust/mapping.py @@ -1,5 +1,13 @@ from types import MappingProxyType -from cpu_governor_auto_adjust.triggers import TestTrigger1, TestTrigger2, RoonTrigger, WakeupTrigger, CpuLoadTrigger, RoonArcTrigger +from cpu_governor_auto_adjust.triggers import ( + TestTrigger1, + TestTrigger2, + RoonTrigger, + WakeupTrigger, + CpuLoadTrigger, + RoonArcTrigger, + RoonClientTrigger, +) _trigger_mapping = { 'test_trigger1': TestTrigger1, @@ -7,6 +15,7 @@ _trigger_mapping = { 'roon': RoonTrigger, 'wakeup': WakeupTrigger, 'cpu_load': CpuLoadTrigger, - 'roon_arc': RoonArcTrigger + 'roon_arc': RoonArcTrigger, + 'roon_client': RoonClientTrigger, } trigger_mapping = MappingProxyType(_trigger_mapping) diff --git a/cpu_governor_auto_adjust/triggers/__init__.py b/cpu_governor_auto_adjust/triggers/__init__.py index 9312d12..83b71b2 100644 --- a/cpu_governor_auto_adjust/triggers/__init__.py +++ b/cpu_governor_auto_adjust/triggers/__init__.py @@ -1,4 +1,4 @@ -__all__ = ["test_trigger1", "test_trigger2", "roon", "wakeup", "cpu_load", "roon_arc"] +__all__ = ["test_trigger1", "test_trigger2", "roon", "wakeup", "cpu_load", "roon_arc", "roon_client"] from .test_trigger1 import TestTrigger1 from .test_trigger2 import TestTrigger2 @@ -6,3 +6,4 @@ from .roon import RoonTrigger from .wakeup import WakeupTrigger from .cpu_load import CpuLoadTrigger from .roon_arc import RoonArcTrigger +from .roon_client import RoonClientTrigger diff --git a/cpu_governor_auto_adjust/triggers/roon_client.py b/cpu_governor_auto_adjust/triggers/roon_client.py new file mode 100644 index 0000000..cd576d5 --- /dev/null +++ b/cpu_governor_auto_adjust/triggers/roon_client.py @@ -0,0 +1,7 @@ +from cpu_governor_auto_adjust.triggers.log import LogTrigger +from cpu_governor_auto_adjust.config import Config + + +class RoonClientTrigger(LogTrigger): + def __init__(self, _config: Config) -> None: + super().__init__(_config) diff --git a/pyproject.toml b/pyproject.toml index d7b04eb..637c727 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "cpu_governor_auto_adjust" -version = "0.6.8" +version = "1.1.0" description = "This application has been developed to automatically change cpu governor based on certain triggers." authors = [ { name = "Martin Reurekas", email = "martin@semrks.nl" }