-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Add blueprint with entity state trigger #65
Comments
Slalamander, hello! Thank you for the request and blueprint! The integration creates blueprints automatically, based on known triggers via But I have not much time for this, so you may just create PR with your static blueprint (with correct |
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 |
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 the
full.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
The text was updated successfully, but these errors were encountered: