Created
February 5, 2019 00:40
-
-
Save xbmcnut/e238c00ec929e357e46462675dce3988 to your computer and use it in GitHub Desktop.
Package to allow Google TTS to advise of HA states for key devices. Scripts added directly to Cloud config.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
script: | |
speak_garage_status: | |
alias: 'Ask Google for Garage Status' | |
sequence: | |
- delay: | |
seconds: 2 | |
- service: tts.google_say | |
entity_id: | |
- media_player.kitchen_home | |
- media_player.insignia_speaker | |
data_template: | |
message: >- | |
The garage door is currently {{states('sensor.garage_status')}} | |
speak_pool_status: | |
alias: 'Ask Google for Pool Temperature' | |
sequence: | |
- delay: | |
seconds: 2 | |
- service: tts.google_say | |
entity_id: | |
- media_player.kitchen_home | |
- media_player.insignia_speaker | |
data_template: | |
message: >- | |
The pool temperature is currently {{states('sensor.pool_temperature')}} degrees | |
## Template takes only the time value in 24hr time ## | |
speak_next_high_tide: | |
alias: 'Ask Google for next High Tide time' | |
sequence: | |
- delay: | |
seconds: 2 | |
- service: tts.google_say | |
entity_id: | |
- media_player.kitchen_home | |
- media_player.insignia_speaker | |
data_template: | |
message: >- | |
The next high tide is at {{ as_timestamp(states.sensor.onetaunga_bay_tides.attributes.high_tide_time_utc) | timestamp_custom("%H:%M") }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Since I couldn't add cloud.yaml, pasted the script code in script.yaml.
This what my script.yaml looks like:
script:
speak_last_feed:
alias: 'Ask Google for Last Feed'
sequence:
- delay:
seconds: 2
- service: tts.google_say
entity_id:
- media_player.bedroom_speaker
- media_player.kitchen_speaker
- media_player.living_room_speaker
data_template:
message: >-
The last feed was {{ as_timestamp('sensor.last_feeding')}}
This is what my configuration.yaml looks like
Example configuration.yaml entry
google_assistant:
project_id:
service_account: !include SERVICE_ACCOUNT.JSON
report_state: true
exposed_domains:
- switch
- input_boolean
- input_select
- script
- media_player
- sensor
entity_config:
switch.speak_last_feed:
name: speak_last_feed
aliases:
- Last Feed
-
This is the error I am getting:
![image](https://user-images.githubusercontent.com/17659155/229384300-c4009c55-1b49-4b40-9bd1-52cbbcec6536.png)