1919)
2020
2121
22- # Battery monitoring ruleset
23- def _form_spec_oposs_wiseways_ups_battery ():
22+ # Combined UPS monitoring ruleset for all services
23+ def _form_spec_oposs_wiseways_ups ():
2424 return Dictionary (
25- title = Title ("OPOSS Wiseways UPS Battery Monitoring" ),
26- help_text = Help ("Configure thresholds for UPS battery monitoring" ),
25+ title = Title ("OPOSS Wiseways UPS Monitoring" ),
26+ help_text = Help ("Configure thresholds for all UPS monitoring services " ),
2727 elements = {
28+ # Battery parameters
2829 "battery_charge_lower" : DictElement (
2930 parameter_form = SimpleLevels (
3031 title = Title ("Battery charge levels" ),
@@ -71,25 +72,8 @@ def _form_spec_oposs_wiseways_ups_battery():
7172 prefill_fixed_levels = DefaultValue ((10.0 , 5.0 )),
7273 ),
7374 ),
74- },
75- )
76-
77-
78- rule_spec_oposs_wiseways_ups_battery = CheckParameters (
79- title = Title ("OPOSS Wiseways UPS Battery" ),
80- topic = Topic .POWER ,
81- name = "oposs_wiseways_ups_battery" ,
82- parameter_form = _form_spec_oposs_wiseways_ups_battery ,
83- condition = HostAndServiceCondition (),
84- )
85-
86-
87- # Power (voltages) monitoring ruleset
88- def _form_spec_oposs_wiseways_ups_power ():
89- return Dictionary (
90- title = Title ("OPOSS Wiseways UPS Power Monitoring" ),
91- help_text = Help ("Configure voltage thresholds for UPS power monitoring" ),
92- elements = {
75+
76+ # Power/Voltage parameters
9377 "input_voltage_upper" : DictElement (
9478 parameter_form = SimpleLevels (
9579 title = Title ("Input voltage upper levels" ),
@@ -138,25 +122,8 @@ def _form_spec_oposs_wiseways_ups_power():
138122 prefill_fixed_levels = DefaultValue ((210.0 , 200.0 )),
139123 ),
140124 ),
141- },
142- )
143-
144-
145- rule_spec_oposs_wiseways_ups_power = CheckParameters (
146- title = Title ("OPOSS Wiseways UPS Power" ),
147- topic = Topic .POWER ,
148- name = "oposs_wiseways_ups_power" ,
149- parameter_form = _form_spec_oposs_wiseways_ups_power ,
150- condition = HostAndServiceCondition (),
151- )
152-
153-
154- # Load monitoring ruleset
155- def _form_spec_oposs_wiseways_ups_load ():
156- return Dictionary (
157- title = Title ("OPOSS Wiseways UPS Load Monitoring" ),
158- help_text = Help ("Configure thresholds for UPS load monitoring" ),
159- elements = {
125+
126+ # Load parameters
160127 "load_upper" : DictElement (
161128 parameter_form = SimpleLevels (
162129 title = Title ("Output load levels" ),
@@ -170,25 +137,8 @@ def _form_spec_oposs_wiseways_ups_load():
170137 ),
171138 required = True ,
172139 ),
173- },
174- )
175-
176-
177- rule_spec_oposs_wiseways_ups_load = CheckParameters (
178- title = Title ("OPOSS Wiseways UPS Load" ),
179- topic = Topic .POWER ,
180- name = "oposs_wiseways_ups_load" ,
181- parameter_form = _form_spec_oposs_wiseways_ups_load ,
182- condition = HostAndServiceCondition (),
183- )
184-
185-
186- # Frequency monitoring ruleset
187- def _form_spec_oposs_wiseways_ups_frequency ():
188- return Dictionary (
189- title = Title ("OPOSS Wiseways UPS Frequency Monitoring" ),
190- help_text = Help ("Configure frequency thresholds for UPS monitoring" ),
191- elements = {
140+
141+ # Frequency parameters
192142 "frequency_upper" : DictElement (
193143 parameter_form = SimpleLevels (
194144 title = Title ("Frequency upper levels" ),
@@ -219,10 +169,10 @@ def _form_spec_oposs_wiseways_ups_frequency():
219169 )
220170
221171
222- rule_spec_oposs_wiseways_ups_frequency = CheckParameters (
223- title = Title ("OPOSS Wiseways UPS Frequency " ),
172+ rule_spec_oposs_wiseways_ups = CheckParameters (
173+ title = Title ("OPOSS Wiseways UPS" ),
224174 topic = Topic .POWER ,
225- name = "oposs_wiseways_ups_frequency " ,
226- parameter_form = _form_spec_oposs_wiseways_ups_frequency ,
175+ name = "oposs_wiseways_ups " ,
176+ parameter_form = _form_spec_oposs_wiseways_ups ,
227177 condition = HostAndServiceCondition (),
228178)
0 commit comments