I’m finally starting to make some progress. I’ve got a simple script running which turns a switch on at night then again off in the morning. It’s working great. Now I would like to add an action where an email through GMail is sent to my cell phone. I added an action to the light switch automation but it doesn’t seem to be working. I also thought to set up a simple script just for the purposes of testing the email function but still not working. I’m using Hass.io.
The error reported is;
ERROR (MainThread) [homeassistant.core] Invalid service data for notify.hassio: required key not provided @ data[‘message’]. Got None
The script is called “Send Page”, Action Type is “Call Service”, the Service is "notify.hassio, in the Service Data field it’s blank with {}.
Unfortunately it seems that frequently after making changes to the configuration file, I have to format and reload the OS because the thing locks up and/or locks me out. This is a very slow process.
I think I’ll abandon this idea. I had to format the drive and reload the OS 3 times today just to get back to the point where I could turn my light switch on and off again. Each time I try to add some of the extra features the thing locks up. Best to leave well enough alone.
Just to be sure and not to give up too early, all I did was change the name from Hassio to hassio and the thing is completely locked up again. I’ve rebooted several times and there seems no way to recover it. I’ll reformat once more then if I can get it to turn my switch on and off again, I’ll just leave it alone.
Dude, the problem in your code is not in the bit you posted, it’s in your script, which we can probably fix if you post it here. (I did ask yesterday, and Tinkerer has even tried to guess the error for you in the absence of the script itself).
I don’t know what you’re asking for. I would gladly share this. I have seen some link to here and there but I don’t understand. I was clear about the fact that I’m quite new to this and I am resigned to the possibility that this may not be the forum for learning. I don’t mean to waste your time.
Code Block - Still trying to understand how to give you what you’re asking for. When I click and copy the info, not everything is posted.
Thank you for your patience and help with this. As soon as I paste and restart the following into my scripts.yaml file, Hassio locks up. The only way I’ve been able to recover is by reformatting and starting over.
#Notification
script:
test_notification:
alias: Test Notification
sequence:
- service: notify.Hassio
data:
message: ‘This is a test notification!’
and ensure the rest is formatted like this (with spaces, not tabs):
test_notification:
alias: Test Notification
sequence:
- service: notify.Hassio
data:
message: 'This is a test notification!'
Also note that in your paste you are using some kind of non-standard apostrophes (presumably from editing the file in Word or some other ‘clever’ text editor).
The formatting does look as you’ve shown it. I’m not sure why the formatting changes when I copy and paste. I have made the changes to the file and rebooting now but I suspect that I’ll need to reformat and start over. In the past, once I’ve entered this state, even after deleting the contents of the scripts.yaml file it doesn’t recover. I’ll post my results shortly.