Here is what I had found to work:
short answer
tts.google_translate_say( entity_id = "media_player.nestmini<what yours is>", message="Hey, I did a thing.")
full code with day of week
import datetime
@time_trigger("once(6:40)")
def drop_early_school():
now = datetime.datetime.now()
day = now.strftime("%A")
if day == 'Monday' or day == 'Wednesday' or day == 'Friday':
tts.google_translate_say( entity_id = "media_player.nestmini<what yours is>", message="Hey, It is time to get in the car for School.")
Original message:
Hello,
I have been getting started with automation with pyscript. I have success with completing an automation, and of course now, I want more…
I have been searching looking to see that I can call a service like I can with the developer tools using pyscript. This is what I have tried so far
@time_trigger("once(10:45)")
def do_a_thing():
service.call("tts", "google_translate_say", entity_id: "media_player.nestmini<what yours is>", message='Hey, I did a thing')
and I have also tried variations of :
tty.google_translate_day('Hey, I did a thing') but to no avail.
I have to assume that others have had success?
Regards