Open Slalamander opened 8 months ago
Slalamander, hello!
Thank you for the request and blueprint!
The integration creates blueprints automatically, based on known triggers via blueprint_generator.py
as part of the release process
The best way to create blueprint -- update it.
But I have not much time for this, so you may just create PR with your static blueprint (with correct source_url
and without comment part in the blueprint), and I'll add automation later.
Static blueprint will not be overwritten, before generator update.
I've created the PR. If there's anything left to do please let me know :)
Looks great, thank you!
Merged without new release, but I'll add a note to next release notes.
Will keep this issue open until blueprint_generator
update.
General information
The current provided blueprint works on device triggers. These don't provide as much information in their trigger variable as a state trigger does (most importantly, there is no
from_state
). I've edited thefull.yaml
blueprint to make this work, and I've added the code below. Since I saw some python files in the folder of which I wasn't sure what they did, I opted not to make a pull request but instead do it like this. My idea would be to simply add this as a second blueprint in the repo. Due to problems when re-importing (caused overwriting) I've commented out thesource_url
key currently.Usage scenario
When starting sleep tracking, my sleep as android pauses first. I'd like to slowly dim the lights once this happens, but also would like a night light to turn on when I pause it while actually asleep. By using the
from_state
trigger variable, I can put a condition in the action that makes it only trigger if the previous state was notsleep_tracking_started
for example.Blueprint