'dict object' has no attribute rule

I have this error triggered every 30s:

2024-05-26 18:47:05.799 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: ‘dict object’ has no attribute ‘rule’ when rendering ‘{{ value_json.rule.enabled }}’

Does anybody know where to search the cause?

The first places I would check would be MQTT and REST sensor configurations.

thank you, it was a REST sensor. Wouldn’t it be great to state the sensor name that causes an error?

Hi, I have a similar error that comes also from a rest sensor. How did you solve this problem?

A device that I integrated over a rest API was not connected (wifi).

Because there is not information in the error message which source causes the error, you need to go trough your configuration.yaml file and check the rest API integrations.

I solved it by connecting this device again.

Hi I have a similar problem but I am unclear where to find the error:

Logger: homeassistant.helpers.template
Source: helpers/template.py:2742
First occurred: 27 October 2024 at 18:05:22 (137348 occurrences)
Last logged: 20:32:48

Template variable warning: ‘dict object’ has no attribute ‘HPJR’ when rendering ‘{{value_json[‘CONTRACT’][‘HPJR’]}}’
Template variable warning: ‘dict object’ has no attribute ‘HCJR’ when rendering ‘{{value_json[‘CONTRACT’][‘HCJR’]}}’

Any ideas are greatly appreciated as this is filling my logs

cheers…j