From e39418980c11f2ec3fd784e142eb0a734f63cbec Mon Sep 17 00:00:00 2001
From: Jan David Mol <mol@astron.nl>
Date: Tue, 2 Apr 2024 11:22:24 +0000
Subject: [PATCH] Fix mixing of device class wrappers

---
 README.md                                                  | 1 +
 tangostationcontrol/VERSION                                | 2 +-
 .../devices/base_device_classes/power_hierarchy.py         | 7 ++-----
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/README.md b/README.md
index 65d47484f..cca501671 100644
--- a/README.md
+++ b/README.md
@@ -166,6 +166,7 @@ Next change the version in the following places:
 
 # Release Notes
 
+* 0.32.3 Fixed disappeared metrics from LOFARDevice, OPCUADevice, StationManager.
 * 0.32.2 Change hardware_powered_R to hardware_powered_fraction_R to report partial power.
          Implemented hardware_powered_fraction_R for more devices.
 * 0.32.1 Do not serve stale metrics
diff --git a/tangostationcontrol/VERSION b/tangostationcontrol/VERSION
index 989b29cc3..d721c7684 100644
--- a/tangostationcontrol/VERSION
+++ b/tangostationcontrol/VERSION
@@ -1 +1 @@
-0.32.2
+0.32.3
diff --git a/tangostationcontrol/tangostationcontrol/devices/base_device_classes/power_hierarchy.py b/tangostationcontrol/tangostationcontrol/devices/base_device_classes/power_hierarchy.py
index 54f9c3e75..6fdd418b2 100644
--- a/tangostationcontrol/tangostationcontrol/devices/base_device_classes/power_hierarchy.py
+++ b/tangostationcontrol/tangostationcontrol/devices/base_device_classes/power_hierarchy.py
@@ -41,7 +41,7 @@ def power_hierarchy(cls):
 
     return type(
         cls.__name__,
-        (cls,),
+        (cls,) + cls.__bases__,
         dict(_PowerHierarchyDevice.__dict__),
     )
 
@@ -270,9 +270,6 @@ class PowerHierarchyControlDevice(AbstractHierarchyDevice):
 def power_hierarchy_control(cls):
     return type(
         cls.__name__,
-        (
-            cls,
-            AbstractHierarchyDevice,
-        ),
+        (cls,) + cls.__bases__ + PowerHierarchyControlDevice.__bases__,
         dict(PowerHierarchyControlDevice.__dict__),
     )
-- 
GitLab