Send picture and text to display on Google Nest Hub while sending TTS

Hello,
I’m not able to find media_player.vlc_telnet
I have installed the VLC add but the only entity I could found is VLC update

After installing the add-on it will find a new integration which you need to integratie

I always have the message Impossible to connect

Not sure why but I’m not able to upload image anymore

You can’t upload images at the moment because the forum is still loading the profile pictures after the forum upgrade.
I’m not sure what’s wrong with the vlc media player integration. You should be able to use the same mediaplayer as you want to send the message with picture to as well.

still not able to load pictures

https://community.home-assistant.io/t/cant-post-a-pictures-on-forum/638575/5

Not sure I have understood.
Do you mean I could avoid to use vls media player integration?

I’m not saying you should avoid it, but if you are unable to set enable the integration, it might be a work around.

How?
could you kindly edit your original script to work with google home without vls media player integration?
thanks

No changes to the script are required. Just use the same media_player as you want to display the message on as dummy_player.

So, what I posted here

Would then become:

dinner_ready:
  alias: "TTS with picture when dinner is ready"
  icon: mdi:food
  sequence:
    - alias: "Call the script with the additional data as script variables"
      service: script.turn_on
      target:
        entity_id: script.google_home_tts_screen
      data:
        variables:
          dummy_player: media_player.office_hub 
          target: media_player.office_hub 
          large_text: DINNER!
          small_text: Quick, before it gets cold
          picture_url: http://10.0.0.5/local/pictures/food.jpg
    - alias: "Send the TTS service call to the dummy player"
      service: tts.google_cloud_say
      target: 
        entity_id: media_player.office_hub 
      data:
        message: Dinner is ready!
1 Like

may I use the service tts.google_translate_say as well?

I tried it and it works :smiley: but speaking with a strange foreign accent :laughing:
where I could set the language of tts.google_translate_say ?
thanks again

I have an off topic stupid but relevant for me question.
By using Nabu Casa I still need to Integrate Google Cloud for the tts.google_cloud_say service?

You can use whatever tts service you want, what I posted was just an example

1 Like

I would just suggest to add an additional condition to allow the execution of the automation only if the time elapsed since the last time the automation was activated is more than a certain time (e.g 600 seconds).
This is to prevent an automation from being activated several times in a row over a period of time of your choice.
This avoids possible status bounces that are possible for various reasons or for example that the automation redeems if you go back to get something you forgot and go out again (from https://henriksozzi.it/2021/05/posizione-delle-persone-con-home-assistant/)

condition:
  - condition: time
    after: "17:00:00"
    before: "21:00:00"
    weekday:
      - mon
      - tue
      - wed
      - thu
      - fri
  - condition: template
    value_template: >-
      {{ (as_timestamp(now()) -
      as_timestamp(state_attr('automation.Dad_Leaving_Kids_School',
      'last_triggered') | default(0)) | int > 600)}}

Hi, when I try to create a new script using your code, I get this message:

Message malformed: extra keys not allowed @ data[‘google_home_tts_screen’]

Can you please help?

Did you paste the entire thing in the GUI in the script YAML editor?

Hi,
Few days ago (7th Feb) my automation stop to work correctly.
The audio portion of the automation is it still wotk but not the video one.

alias: Alert from Frigate Ingresso
description: Audio and Video Alert from Frigate Ingresso
trigger:
  - platform: state
    entity_id:
      - binary_sensor.zone_2_person_occupancy
    from: "off"
    to: "on"
condition: []
action:
  - service: tts.cloud_say
    data:
      cache: false
      entity_id: media_player.cucina
      message: >-
        Attenzione, un intruso all ingresso. Ripeto, un intruso è stato
        avvistato all ingresso
  - wait_template: "{{ is_state('media_player.cucina','idle') }}"
    continue_on_timeout: true
  - service: media_player.volume_set
    data:
      volume_level: 0.7
    target:
      entity_id: media_player.cucina
  - service: media_player.play_media
    data:
      media_content_id: >
        {{ "http://192.168.1.13:8123" + state_attr("camera.ingresso_person",
        "entity_picture") }}
      media_content_type: image/jpeg
    target:
      entity_id: media_player.cucina
  - delay:
      hours: 0
      minutes: 0
      seconds: 10
      milliseconds: 0
  - service: tts.cloud_say
    data:
      cache: false
      entity_id: media_player.cucina
      message: Ripeto, un intruso era stato avvistato all ingresso
  - wait_template: "{{ is_state('media_player.cucina','idle') }}"
    continue_on_timeout: true
  - service: media_player.turn_off
    data: {}
    target:
      entity_id: media_player.cucina
  - service: tts.clear_cache
    data: {}
mode: single

I don’t remember to have done any relevnt update.
This is the message in Register

Logger: homeassistant.components.automation.alert_from_frigate_ingresso
Source: components/automation/__init__.py:690
Integration: Automazione (documentation, issues)
First occurred: 7 febbraio 2024 alle ore 20:30:08 (51 occurrences)
Last logged: 10:25:02

Error while executing automation automation.alert_from_frigate_ingresso: Error rendering data template: TypeError: can only concatenate str (not "NoneType") to str

Thanks for your support

media_content_id: >
        {{ "http://192.168.1.13:8123" + state_attr("camera.ingresso_person",
        "entity_picture") }}

Does this work in developer tools > templates?

No.
I have the same error message
TypeError: can only concatenate str (not "NoneType") to str

but it worked in the past