OpenEPaperLink / Home_Assistant_Integration

Home assistant Integration for the OpenEPaperLink project
Apache License 2.0
137 stars 32 forks source link

Input Number (helper) entities give an error #12

Closed MuddyRock closed 1 year ago

MuddyRock commented 1 year ago

Using a helper number entity in a call to the service gives an "Unknown Error". Other entities work fine. Have tried with a helper number (and tried using a Jinja filter to convert to string). Text helpers work fine.

To Reproduce Set up a number helper in Home Assistant Call the service with the below data

service: open_epaper_link.lines4
data:
  mac: <mac>
  line1: "{{states('input_text.br2_guest_name') }}"
  line2: "{{states('input_number.tag_refresher') | string }}"
  format1: mwwr
  format2: mwwb
MuddyRock commented 1 year ago

I have a work around. Append a string (must be alpha, not numeric) to the end of the number, inside the template. Example:

line2: {{ states('input_number.dry_rooms_min_temp') | string + 'C'  }}

An empty string like the below does not work. It also does not work if you put a space inside the final quotes.

line2:  {{ states('input_number.dry_rooms_min_temp') | string + ''  }}
MuddyRock commented 1 year ago

Pull request submitted to fix this. And I've just realised that I'll have to re-do the README again once it's merged.