From dd28cd4e67d31b3d43174a1d2162f80570ccdf36 Mon Sep 17 00:00:00 2001
From: Jan David Mol <mol@astron.nl>
Date: Thu, 22 Feb 2024 15:49:14 +0100
Subject: [PATCH] enable polling explicitly for ObservationField devices

---
 .../tangostationcontrol/devices/observation_field.py         | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tangostationcontrol/tangostationcontrol/devices/observation_field.py b/tangostationcontrol/tangostationcontrol/devices/observation_field.py
index c0ef919eb..df970322a 100644
--- a/tangostationcontrol/tangostationcontrol/devices/observation_field.py
+++ b/tangostationcontrol/tangostationcontrol/devices/observation_field.py
@@ -15,6 +15,7 @@ from jsonschema.exceptions import ValidationError
 from tango import AttrWriteType, DeviceProxy, DevState, Util
 from tango.server import attribute
 from tangostationcontrol.common.constants import (
+    DEFAULT_METRICS_POLLING_PERIOD,
     DEFAULT_POLLING_PERIOD,
     MAX_ANTENNA,
     N_beamlets_ctrl,
@@ -308,6 +309,10 @@ class ObservationField(LOFARDevice):
             self._observation_field_settings.antenna_field,
         )
 
+        # TODO(JDM): Somehow this does not get configured automatically
+        # as it does for non-dynamic devices.
+        self.poll_command("poll_attributes", DEFAULT_METRICS_POLLING_PERIOD)
+
     def configure_for_off(self):
         """Indicate the observation has stopped"""
 
-- 
GitLab