Closed gribouk closed 3 years ago
Check https://github.com/rogro82/hass-variables/issues/47 for the answer
Also in your previous comment on #47 (Which you deleted) you even mentioned my repository at https://github.com/Wibias/hass-variables . In the README.MD over there is the right & updated format that you need to use.
@wibias, was that a post for me? don't recall deleting anything tbh.
Yes, there was one. But the context has chaned and I had to change the message....
As I discovered, the integration does work if dowloaded from here: https://github.com/Wibias/hass-variables, but DO NOT TEST IT FROM /developer-tools/service. I have no explanation for that, but if you test it from there, no metter what data you feed with your request - it does not template the attributes, explicit values only. When tested from the actuall script/trigger - everything works fine. It took me 3-4 hours of life to discover that. Maybe, in future they correct this, but as of tooday, 28.12.21, it stays like this...
@Mariusthvdb The post was from @gribouk got an email notification from that.
Dear All,
I am trying to use variable objects for my project, but the attributes_template do not work for some reason. I made a small example which yelds no result and I fail to understand why:
No metter what I try, the attributes do not change. Would anyone give me a hint why?
The error message from the log:
Logger: homeassistant Source: custom_components/variable/init.py:219 First occurred: 23:57:58 (1 occurrences) Last logged: 23:57:58
Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/config/custom_components/variable/init.py", line 219, in async_set_variable attributes = json.loads( File "/usr/local/lib/python3.8/json/init.py", line 341, in loads raise TypeError(f'the JSON object must be str, bytes or bytearray, ' TypeError: the JSON object must be str, bytes or bytearray, not Wrapper