imou_life icon indicating copy to clipboard operation
imou_life copied to clipboard

Imou life motion detection (Option 3) automation error

Open sominaik opened this issue 2 years ago • 4 comments

Version of the custom_component

1.0.13

Configuration

Logger: homeassistant.helpers.template
Source: helpers/template.py:233
First occurred: September 5, 2023 at 10:51:55 PM (4 occurrences)
Last logged: 5:43:11 PM

Template variable error: 'dict object' has no attribute 'json' when rendering '{% for entity_name in integration_entities("imou_life") %} {%- if entity_name is match('.+_refreshalarm$') and is_device_attr(entity_name, "hw_version", trigger.json.did) %} {{entity_name}} {%-endif%} {%- endfor %}'

Describe the bug

I am having an error in the automation which I pasted from the repo. Tried to call the service manually to refresh alarm and it works. Just that automation is not kicking in

Debug log

![ImouIssue](https://github.com/user2684/imou_life/assets/69377651/683fad34-2665-4d2b-88f2-e9921f2aca8a)
Is the above error good enough to guide?

sominaik avatar Sep 06 '23 08:09 sominaik

Thanks. Can you have a look in "Traces" after opening up your automation what is the message which is sent by callback? Looks like it is triggering but the content which is sent is not the one the template is expecting. Thanks

user2684 avatar Sep 10 '23 12:09 user2684

Thanks for your response. In the automation traces, this is what I see

Error: Error rendering service target template: UndefinedError: 'dict object' has no attribute 'json'

sominaik avatar Sep 11 '23 00:09 sominaik

Is it possible to advise any ETA for the fix? Thanks in advance

sominaik avatar Sep 16 '23 07:09 sominaik

Hi, I'd need the full trace with the original message sent to the callback to troubleshoot this unfortunately. Thanks

user2684 avatar Sep 24 '23 08:09 user2684

Closing for now due to inactivity

user2684 avatar Sep 28 '24 08:09 user2684