Ok, So I imported the blueprint and it now show that it has got no inputs (“Diese Blaupause hat keine Eingaben.” in my German HA) and thus doesn’t work. It also looks corrupt (see screenshot) and lots of YAML code appears.
When clicking "Create script’ from the blueprint, the screen shows your info but on the bottom it says ‘This blueprint has no inputs’. Is this correct?
I don’t see any of the GUI config options you are mentioning in this forum post.
Does the blueprint contains bug that causes to load only the first bit of the blueprint?
So what happens if you click on the Create Script (in that drop down with the three dots) and then press Save Script?
This should create the script with a random script name, like script.1689154272736.
Does that work? Because maybe your input is not allowed by Home Assistant.
Found it…
I didn’t have a !include script.yaml in my configuration.yaml file.
The scripts I tried to make did get saved to the file, but weren’t shown in HA.
After including scripts.yaml I got 20+ Notify Mobile scripts in HA
This version adds new options for Android Auto (Android Devices only):
Added the car_ui: true when the device is Android and when the android_auto binary sensor is on, so you can interact with the notifications whilst driving. Introduction | Home Assistant Companion Docs
Added a new option: Android Only - Notify using TTS whilst using Andriod Auto? (Optional) This “upgrades” the notification message to a TTS message, when the binary_sensor.###_android_auto is on. This can be useful whilst driving with Android Auto that the notification that you are sending is announced via TTS.
The blueprint now contains a input Android Only - Enter a custom Text to Speech text used to announce the actions, when your device is connected to the Android Auto. .
This 3rd option is only relevant if all of the following are true:
Your using a Android phone
You enabled the new option Android Only - Notify using TTS whilst using Android Auto? (Optional)
Your Android phone is in the Android Auto mode (when the binary_sensor.###_android_auto is on)
When you have actions defined, that could require action from the user
This new feature allows you to hear the Text to Speech message, receive the notification and the possible interact with actions that you could take. The input field is useful to customize the TTS message in the desired language. The format to use is as follows: message+announcement+actions
Only the announcement part is needed as the input to introduce the actions.
Examples:
Select 1 of the following actions on your phone
Selecteer 1 van de volgende acties op je telefoon
Use case example
service: script.notify_devices
data:
notify_message: The alarm is turned off
data_tag: alarm
data_channel: Alarm
data_group: Alarm
data_sticky: true
data_importance: high
data_timeout: 300
notify_title: Alarm • Off
data_notification_icon: mdi:shield-lock-open-outline
notify_home_or_away: Both
data_clickaction_url: /dashboard-alarm/alarm
data_notification_color:
- 0
- 173
- 0
data_persistent: true
notify_in_car_using_tts: true
data_actions: >-
{{iif(is_state('binary_sensor.alarm_night_mode','off'),[{'action':'RESUME_NIGHT_ALARM','title':'Enable the night alarm'},],'')}}
This would result in the following TTS message: The alarm is turned off. Select 1 of the following actions on your phone: Enable the night alarm
Unfortunately, your script does not work with one of my device trackers, although the regular notification in HA does work:
Logger: homeassistant.components.script.notify_mobile_app_devices
Source: helpers/script.py:420
Integration: Skript (documentation, issues)
First occurred: 10:45:04 (12 occurrences)
Last logged: 11:46:44
Notify Mobile App Devices: Repeat at step 2: Error executing script. Service not found for call_service at pos 3: Unable to find service notify.mobile_app_pixel_5_4
Notify Mobile App Devices: Error executing script. Service not found for repeat at pos 2: Unable to find service notify.mobile_app_pixel_5_4
What is wrong with this tracker? This tracker exists and yields to the gps position of the device. Any help is appreciated
So the script does a find and replace of the device_tracker, into the notify service. This is done since there is no feature to discover the services of devices (that I’m aware of). So as an example: device_tracker.android → notify.mobile_app_android device_tracker.iphone_123 → notify.mobile_app_iphone_123
Ect…
So my suggestion is to rename your device_tracker entity so it aligns with the notify service, until Home Assistant comes with a better way to get the services of a device.
When I try to start the program after installation it comes with ‘Response error: 500’ i.e. right after ‘Save Script’ the first time, there are some who have a solution. I am using ‘Watchman report’ which shows the error 'script.notify_devices [missing] and ‘lock.caf [missing] notify_devices.yaml’
What I would suggest (and others feel free to add your thoughts on this) to do is to remove the integration, then search for any other integrations which create these device_tracker. Once done then install it again/register your device, so it hopefully create the correct tracker with the correct notification service:
Remove your Device from Home Assistant in your mobile app . Settings → Companion App → Select your Home Assistant instance (like Home ) → Scroll to the bottom and select Delete
Open your Home Assistant instance and open the Mobile App integration
If your device is still listed then use the three vertical dots and use Delete,
Search in the list for the device_tracker.pixel_5(s) and see if can remove those from the corresponding integration (maybe a network integration?)
Once those are removed then validate the notify service:
Navigate to the Developer Mode → Services and search for the notify.mobile_app_###
Now these services should not exist anymore.
Reboot and validate it again (step 3, 4 and 5). Are the device_tracker.pixel_5(s) and notify.mobile_app_### now really gone? If not then check step 4
Register your device again in the app
Enable the other integrations again, so the other device_tracker(s) are created again.
script.notify_devices is purly an example, and Watchman picks up those examples, without validating. So I would not focus to much on that.
dummylabs/thewatchman: Home Assistant custom integration to keep track of missing entities and services in your config files (github.com)
The integration has very simple internals, it knows nothing about complex relationships and dependencies among yaml configuration files as well as nothing about the semantics of entities and automations. It parses yaml files line by line and tries to guess references either to an entity or to a service, based on the regular expression heuristics. The above means the integration can give both false positives (something which looks like a duck, swims like a duck, and quacks like a duck, but is not) and false negatives (when some entity in a configuration file was not detected by the integration). To ignore false positives ignored_items parameter can be used (see Configuration section below), improvements for false negatives are a goal for future releases.
What you’re asking for is correct on my end, but notify_devices.png doesn’t exist. I’m using Home Assistant 2023.8.2. The only thing I can see when I enter ‘Studio Code Server’ is “[{
“resource”: “/config/blueprints/script/Grumblezz/notify_devices.yaml”,
“owner”: “generated_diagnostic_collection_name#0”,
“severity”: 8,
“message”: “Incorrect type. Expected “object”.”,
“source”: “yaml-schema: http://schemas.home-assistant.io/blueprint-script”,
“startLineNumber”: 1132,
“startColumn”: 17,
“endLineNumber”: 1132,
“endColumn”: 34
}]”
The three files will there whenever you would download the release from Github, otherwise if you used just the import option button in HA then only the notify_devices.yaml is downloaded.
Just the notify_devices.yaml is sufficient, because that is the actual blueprint.
Could you validate that the file content is identical to what is on Github?
Because the warning unfortunately does not mean me anything this far.