aohzan / hass-blueprints Goto Github PK
View Code? Open in Web Editor NEWMy personnal collection of Home-Assistant's blueprints
License: Apache License 2.0
My personnal collection of Home-Assistant's blueprints
License: Apache License 2.0
Hi,
There's a typo in the android blueprint... It ends with the letter u on line 172.
Thanks for the blueprints, @Aohzan. I imported the latest blueprint for medication reminders. It notifies me, but when I click on the notification, it simply opens the HA app on my iPhone and there are no options to choose. I'm using iOS 17.0.3 with the latest HA iOS app. Home Assistant 2023.4.4 Frontend 20230411.1.
Maybe it's not a specific problem to this blueprint but something else? It's the first time I'm using notifications with HA, other than just testing.
@Logger: homeassistant.helpers.script
Source: helpers/script.py:409
First occurred: 22:30:00 (3 occurrences)
Last logged: 22:30:00
Error in 'choose[0]' evaluation: In 'template' condition: UndefinedError: 'None' has no attribute 'event'
Logger: homeassistant.helpers.template
Source: helpers/template.py:536
First occurred: 22:30:00 (3 occurrences)
Last logged: 22:30:00
Template variable error: 'None' has no attribute 'event' when rendering '{{ wait.trigger.event.data.actionName == 'taken' }}'
Template variable error: 'None' has no attribute 'event' when rendering '{{ wait.trigger.event.data.actionName == 'later' }}'
Template variable error: 'None' has no attribute 'event' when rendering '{{ wait.trigger.event.data.actionName == 'skip' }}'
My Automation
- id: '1667946269544'
alias: medication jon
description: ''
use_blueprint:
path: Aohzan/medication_reminder_ios.yaml
input:
reminder_time: '22:25:00'
notify_device: 930fc2b96b822afa942def34c7d2ad88
input_boolean: input_boolean.medicationjon
ask_later_wait_time: 5
Using the blueprint IOS
Firstly, thank you for writing this blueprint. I love it.
I am experiencing a slight issue when using it and I am hoping you can help. The automation works fine but I cannot respond to the event notifications. No matter what option I choose for the notification (taken, skip, delay) there is an error in the log during the choose condition and the automation defaults to dismissing the notification.
I have set-up a button to manually set the input boolean to "on" and mark the medication as taken but it would be nice to use the event notifications that you included.
The error is: Error: In 'template' condition: UndefinedError: 'None' has no attribute 'event'
Here is a screenshot of the automation timeline showing the error:
I've setup the automation using your blueprint, but when it activates, the notifications come back immediately
homeassistant | 2022-12-12 15:35:47.753 INFO (MainThread) [homeassistant.components.automation.medication_reminder_ryan] Medication reminder (Ryan): Notify until the medication has been take: Choose at step 5: default: Running automation actions
homeassistant | 2022-12-12 15:35:47.753 INFO (MainThread) [homeassistant.components.automation.medication_reminder_ryan] Medication reminder (Ryan): Notify until the medication has been take: Choose at step 5: default: Executing step device automation
homeassistant | 2022-12-12 15:35:47.915 INFO (MainThread) [homeassistant.components.mobile_app.notify] mobile_app push notification rate limits for Ryans phone: 10 sent, 500 allowed, 0 errors, resets in 0:24:12
homeassistant | 2022-12-12 15:35:47.915 INFO (MainThread) [homeassistant.components.automation.medication_reminder_ryan] Medication reminder (Ryan): Notify until the medication has been take: Choose at step 5: default: Executing step call service
homeassistant | 2022-12-12 15:35:47.916 INFO (MainThread) [homeassistant.components.automation.medication_reminder_ryan] Medication reminder (Ryan): Repeating Notify until the medication has been take: Iteration 2
homeassistant | 2022-12-12 15:35:47.917 INFO (MainThread) [homeassistant.components.automation.medication_reminder_ryan] Medication reminder (Ryan): Notify until the medication has been take: Running automation actions
homeassistant | 2022-12-12 15:35:47.917 INFO (MainThread) [homeassistant.components.automation.medication_reminder_ryan] Medication reminder (Ryan): Notify until the medication has been take: Executing step call service
homeassistant | 2022-12-12 15:35:47.918 INFO (MainThread) [homeassistant.components.automation.medication_reminder_ryan] Medication reminder (Ryan): Notify until the medication has been take: Choose at step 2: choice 1: Running automation actions
homeassistant | 2022-12-12 15:35:47.919 INFO (MainThread) [homeassistant.components.automation.medication_reminder_ryan] Medication reminder (Ryan): Notify until the medication has been take: Executing step device automation
homeassistant | 2022-12-12 15:35:48.132 INFO (MainThread) [homeassistant.components.mobile_app.notify] mobile_app push notification rate limits for Ryans phone: 10 sent, 500 allowed, 0 errors, resets in 0:24:11
homeassistant | 2022-12-12 15:35:48.132 INFO (MainThread) [homeassistant.components.automation.medication_reminder_ryan] Medication reminder (Ryan): Notify until the medication has been take: Executing step wait for trigger (timeout: 0:30:00)
homeassistant | 2022-12-12 15:35:48.133 INFO (MainThread) [homeassistant.components.automation.medication_reminder_ryan] Medication reminder (Ryan): Notify until the medication has been take: Initialized trigger
homeassistant | 2022-12-12 15:37:35.308 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new automation.automation entity: automation.advanced_medication_reminder_android
homeassistant | 2022-12-12 15:37:35.312 INFO (MainThread) [homeassistant.components.automation.advanced_medication_reminder_android] Initialized trigger Advanced medication reminder (Android)
If I tap on the notification and open the HomeAssistant app it will clear. But when I select "taken" or "remind" or "skip" it just comes back immediately.
This creates the entry into the automation.yaml file but the automation does not show up in the GUI or trigger when running. Home Assistant provides the following error:
Blueprint Advanced medication reminder generated invalid automation with inputs OrderedDict([('reminder_time', '10:00:00'), ('notify_device', '65f01c64a9dd6df8fe29a1521c3cc3a7'), ('input_boolean', 'ammedskeith'), ('optional_action', [])]): not a valid value for dictionary value @ data['action'][0]['target']['entity_id']. Got None
I am not sure what the problem is - can you please advise?
Heya,
It seems that the notification actions aren't doing anything on Android (OnePlus).
It doesn't open the app if I click on the options (only on the main notifications), and I can't see anything in the logs that would indicate that those actions are being logged.
alias: Medication reminder (Alex)
description: ""
use_blueprint:
path: Aohzan/medication_reminder_android.yaml
input:
reminder_time: "23:00:00"
notify_device: c04a27331390c64d531ab2d188a49e2e
input_boolean: input_boolean.alex_medication_boolean
optional_action: []
Two different phones are having this particular behaviour.
Is there anyway to add a sound to the notification? Ive tried to add through the optional actions, but without success.
Thank you in advance
From another blueprint if you add a toggle;
input:
is_ios:
name: Is it an iOS device?
description: Toggle if your selected device runs iOS, default is Android
selector:
boolean: {}
default: false
Then variable:
variables:
is_ios: !input 'is_ios'
Then define the data based on:
- device_id: !input 'notify_device'
domain: mobile_app
type: notify
title: '{{ notification_title }}'
message: '{{ notification_message }}'
data: '{% set android_data = {"image": "%s"} | format(snapshot_access_file_path)
%} {% set ios_data = {"attachment": {"url": "%s", "content_type": "JPEG"}} | format(snapshot_access_file_path)
%} {{ ios_data if is_ios else android_data }}'
I use this blueprint and for the most part really like it as a daily reminder to take my meds.
however, I think there is one improvement that will make this much better in my eyes.
Situation: Sometimes I wake up early and right before brushing my teeth I'll just take my meds then... and then I go into HA and click my input boolean that I took the meds already. I expected this to then turn off the first run of the daily reminders as there is no need to send reminder because I already took the meds.
However, this doesn't appear to be the case. I have 9am as the set start time and right at 9am the input boolean resets to off and the automation runs reminding me to take the meds.
So I propose a way to turn it off ahead of time if you wanted to take your meds already and didn't need to be reminded.
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.