From: Giorgio Ravera Date: Sun, 10 Feb 2019 19:19:06 +0000 (+0100) Subject: Added Google Home commands X-Git-Url: http://git.giorgioravera.it/?a=commitdiff_plain;h=cb421cc2d5d79f607c21fe0e0fa28f09fffe4956;p=homeassistant.git Added Google Home commands --- diff --git a/automation/media_player.yaml b/automation/media_player.yaml index ce0538fb..141e28e6 100644 --- a/automation/media_player.yaml +++ b/automation/media_player.yaml @@ -1,7 +1,6 @@ ###################################################################### # TV: change channel -# - greeting -# - disable away mode +# - script.tv_change_channel ###################################################################### - alias: TV cambia canale @@ -16,3 +15,21 @@ data_template: tv: "media_player.tv_sala" channel: "{{ trigger.to_state.state }}" + +###################################################################### +# Google Home: speeak message +# - script.notify_voice +###################################################################### + +- alias: Google Home pronuncia testo + trigger: + - platform: state + entity_id: input_text.google_home_speak + + condition: [] + + action: + - service: script.speech_engine + data_template: + media_player: "media_player.google_home" + message: "{{ trigger.to_state.state }}" diff --git a/configuration.yaml b/configuration.yaml index fb565ef7..39c407d4 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -113,6 +113,9 @@ switch: !include_dir_merge_list switch/ tts: - platform: google language: it + cache: true + time_memory: 300 + base_url: !secret base_url # Multimedia media_player: !include_dir_merge_list media_player/ diff --git a/group/media_player.yaml b/group/media_player.yaml index 98f512da..41b792d1 100644 --- a/group/media_player.yaml +++ b/group/media_player.yaml @@ -3,7 +3,15 @@ media_player: view: true icon: mdi:television entities: + - group.google_home - group.tv_sala + +google_home: + name: Google Home Cucina + control: hidden + entities: + - media_player.google_home + - input_text.google_home_speak tv_sala: name: TV Sala @@ -16,3 +24,5 @@ tv_sala: - script.tv_play_pause - script.tv_toggle - input_text.tv_change_channel + + diff --git a/input_text/media_player.yaml b/input_text/media_player.yaml index 1afe0ae5..42f21cd8 100644 --- a/input_text/media_player.yaml +++ b/input_text/media_player.yaml @@ -7,4 +7,11 @@ tv_change_channel: min: 1 max: 3 pattern: '[1-999]' + mode: text + +###################################################################### +# Input Text: Google Home Speak +###################################################################### +google_home_speak: + name: Pronuncia mode: text \ No newline at end of file