Using VBML in a script #17
Replies: 2 comments 1 reply
-
This should help to send to multiple devices: https://www.home-assistant.io/docs/scripts/#for-each Additionally, you might want to make the weather an optional input as well |
Beta Was this translation helpful? Give feedback.
-
I've caught an error, but I'm not sure how to fix it. Depending on how this line is built, I can either send the ' symbol or the " symbol, but the other will either break the script or send an escaped version of the character.
This way (using the props method of VBML to inject the text) results in a successful run of the script, however the " is replaced with " and the ' is replaced with '
This way (directly injecting the script field into the VBML) allows me to send the ' character, but the " character will error out the script by breaking the dictionary being send for the VBML. Any ideas, @natekspencer ? |
Beta Was this translation helpful? Give feedback.
-
Howdy. The discussions tab for this repo isn't open, so I'm just posting this in the issues.
Thanks so much for getting the VBML endpoint to work! It's really opened up what we can do with the VB in Home Assistant.
I put this script together as a sort of modification of what you did with the "decoration" part of the integration. The script takes three arguments:
You might have to change the weather entity depending on the integration you're using but the rest should be functional.
It's designed to balance simplicity with a bit of optionality. My goal is to make this a UI-friendly script for beginners.
One thing I'm getting caught on, and can't test since I only have one Vestaboard, is the option to have multiple VBs selected in the script.
If anyone could help me out with that, I'd be grateful. I have the field set up to accept multiple boards, but I don't know how to inject those associated device IDs into the device_id input of the integration.
Beta Was this translation helpful? Give feedback.
All reactions