[GH-ISSUE #359] Unable to have a calculated value for parameter x_end #2975

Closed
opened 2026-03-20 22:06:14 +01:00 by sascha_hemi · 1 comment
Owner

Originally created by @metscore on GitHub (Aug 14, 2024).
Original GitHub issue: https://github.com/OpenEPaperLink/OpenEPaperLink/issues/359

Describe the bug
I'm trying to draw a rectangle with a calculated value derived from a state. When I paste the yaml into the automation of HomeAssistant and reload the same yaml directly, the calculated value is x_end: "[object Object]": null which makes the automation fail.

To Reproduce
Steps to reproduce the behavior:

  1. In Home Assistant, go the Automations tab and Create an automation.
  2. Press Edit in yaml mode
  3. Paste the this partial code as one part of a payload:
- type: rectangle
  x_start: 82
  y_start: 24
  x_end: {{ (states('sensor.pollen_malmo_bjork') | int * 10 + 80 - 2) }}
  y_end: 38
  width: 0
  fill: red
  outline: red

  1. Save the automation and re-open in yaml mode again.
  2. The "calculated" value (x_end) is now replaced with
    x_end: "[object Object]": null

image

  1. If the "erroneous" calculation is replaced by a regular numerical value, the display output works just fine.

image

If I try to use the following code, i.e. no state object, just values
x_end: {{ 123 | int * 10 + 80 - 2 }}

this also results in a
x_end: "[object Object]": null

Expected behavior
For instance I expected the following
x_end: {{ 123 | int * 10 + 80 - 2 }}
to result in 1308 since it works perfectly in HA developer tools template.

image

Additional context
I use HA core 2024.7.4
HA OS 12.4
OpenEPaperLink 0.4.9.1

Originally created by @metscore on GitHub (Aug 14, 2024). Original GitHub issue: https://github.com/OpenEPaperLink/OpenEPaperLink/issues/359 **Describe the bug** I'm trying to draw a rectangle with a calculated value derived from a state. When I paste the yaml into the automation of HomeAssistant and reload the same yaml directly, the calculated value is `x_end: "[object Object]": null` which makes the automation fail. **To Reproduce** Steps to reproduce the behavior: 1. In Home Assistant, go the Automations tab and Create an automation. 2. Press Edit in yaml mode 3. Paste the this partial code as one part of a payload: ``` - type: rectangle x_start: 82 y_start: 24 x_end: {{ (states('sensor.pollen_malmo_bjork') | int * 10 + 80 - 2) }} y_end: 38 width: 0 fill: red outline: red ``` 4. Save the automation and re-open in yaml mode again. 5. The "calculated" value (x_end) is now replaced with `x_end: "[object Object]": null` ![image](https://github.com/user-attachments/assets/81493b39-6fb1-478c-8f98-112a572c26d3) 6. If the "erroneous" calculation is replaced by a regular numerical value, the display output works just fine. ![image](https://github.com/user-attachments/assets/38ebca0c-4cbe-4411-a1c2-1d71d2a85b79) If I try to use the following code, i.e. no state object, just values `x_end: {{ 123 | int * 10 + 80 - 2 }}` this also results in a `x_end: "[object Object]": null` **Expected behavior** For instance I expected the following `x_end: {{ 123 | int * 10 + 80 - 2 }}` to result in 1308 since it works perfectly in HA developer tools template. ![image](https://github.com/user-attachments/assets/d2a6f0c5-7789-4a09-925d-1b5927d132df) **Additional context** I use HA core 2024.7.4 HA OS 12.4 OpenEPaperLink 0.4.9.1
sascha_hemi added the bug label 2026-03-20 22:06:14 +01:00
Author
Owner

@jonasniesner commented on GitHub (Aug 15, 2024):

Please report HA related issues here
https://github.com/OpenEPaperLink/Home_Assistant_Integration

<!-- gh-comment-id:2290065802 --> @jonasniesner commented on GitHub (Aug 15, 2024): Please report HA related issues here https://github.com/OpenEPaperLink/Home_Assistant_Integration
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/OpenEPaperLink#2975