Make input func monitor support attribute categories. Resolve #3307

This commit is contained in:
Griatch 2023-11-26 13:13:05 +01:00
parent af896b385a
commit 62ff667f9a
3 changed files with 6 additions and 1 deletions

View file

@ -153,7 +153,7 @@ class MonitorHandler(object):
"""
if not fieldname.startswith("db_") or not hasattr(obj, fieldname):
# an Attribute - we track its db_value field
obj = obj.attributes.get(fieldname, return_obj=True)
obj = obj.attributes.get(fieldname, category=category, return_obj=True)
if not obj:
return
fieldname = self._attr_category_fieldname("db_value", category)