-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
data_template and integer #7
Comments
I should definitely look into changing this to accept strings. I'll get into that when I'm redoing this service so it is more robust. ATM I'm dealing with some house issues so not able to make any progress on this in the near term. |
@Mace404 Sorry for the delay, can you check to see if it works with the updated master branch? I added some coercion and it seems to work locally with some quick testing but I don't have the templates that you do so I'm curious to see it work on your end. |
Unfortunately, the whole thing stopped working because of updates. Will grab the latest version and see what happens tho. edit: just saw your post in the other topic, refreshing the dependencies as well. |
Yeah, this works, great stuff! fyi, this is the complete light entity for my Dreamscreen:
|
Awesome! Glad that did it & thanks for the example. Also thanks for the example too. That's pretty slick. |
Great work. It would be nice if you could share your complete entity also for controlling the Dream Screen. I´m completely new in coding ! |
Hi,
First on, great work on the script.
All the services are working great when I call them manually or with a script using a static value.
I added a light template for my Dreamscreen and most of it works great (Detects current status, can turn it on and off).
The thing I'm running in to is that data_template always outputs a string (because that is what Jinja does) and because of that I cannot use data_template to use any form of logic.
I'm using this on my light entity to set brightness:
and this gives the following error:
ERROR (MainThread) [homeassistant.core] Invalid service data for dreamscreen.set_brightness: expected int for dictionary value @ data[‘brightness’]. Got ‘13’
Also see this topic on the Home Assistant forum:
https://community.home-assistant.io/t/integer-list-in-data-template-converts-to-stings/63653
The text was updated successfully, but these errors were encountered: