Replies: 3 comments 7 replies
-
This turns out to be the result of a breaking change in 2021.04. I'm still trying to figure out how to address this and have reached out for some help here. |
Beta Was this translation helpful? Give feedback.
-
Hi @aderusha I'm receiving this in my log. I'm not sure if it's related with a breaking change in 2021.04
|
Beta Was this translation helpful? Give feedback.
-
I was able to get my first HASP up and running without any issues. Frankly I was amazed at simplicity to get it working! However as I was adding more items to the HASP I started having problems. I don't know for sure but issues seemed to start when I forgot to add the device name before I saved. I went back added the device and saved but afterwards nothing seems to be working.
I tried to setup a complete new device and name but still not able to get it working. I am seeing issues in the HA logs about an object missing. I tried the blueprints pre and post the "Break Fix". I'm running current firmware that was built locally and the April release of HA.
Here is the error I'm seeing in the logs
`Logger: homeassistant.helpers.template
Source: helpers/template.py:1346
First occurred: 6:11:10 PM (1 occurrences)
Last logged: 6:11:10 PM
Template variable error: 'jinja2.utils.Namespace object' has no attribute 'source' when rendering '{%- set color = namespace() -%} {%- for entity in device_entities(haspdevice) -%} {%- if entity|regex_search("^light..*selected_foreground_color(?:\d+|)$") -%} {%- set color.source=entity -%} {{ break }} {%- endif -%} {%- endfor -%} {%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {%- set colorcode = (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int -%} [{%- if not page_scroll -%}{%- for p in range(1,12) %}{%- if p == page1page|int %}"p[{{p}}].b[1].pco={{colorcode}}"{%- else -%}"p[{{p}}].b[1].pco2={{colorcode}}"{%- endif -%},{%- endfor -%} {%- else -%}{%- for p in range(1,12) %}"p[{{p}}].b[1].pco2={{colorcode}}",{%- endfor -%}{%- endif -%} {%- for p in range(1,12) %}{%- if p == page2page|int %}"p[{{p}}].b[2].pco={{colorcode}}"{%- else -%}"p[{{p}}].b[2].pco2={{colorcode}}"{%- endif -%},{%- endfor -%} {%- if not page_scroll -%}{%- for p in range(1,12) %}{%- if p == page3page|int %}"p[{{p}}].b[3].pco={{colorcode}}"{%- else -%}"p[{{p}}].b[3].pco2={{colorcode}}"{%- endif -%}{% if not loop.last %},{% endif %}{%- endfor -%} {%- else -%}{%- for p in range(1,12) %}"p[{{p}}].b[3].pco2={{colorcode}}"{% if not loop.last %},{% endif %}{%- endfor -%}{%- endif -%}]'`
Beta Was this translation helpful? Give feedback.
All reactions