Have Google home read out sensor state when asked?

You can do this with IFTT, google home TTS, and scripts. You’ll basically need create a script using templates, and port the dialogue out to google home using tts.google,say. Then you’d use IFTTT to call that script when you send a voice command to google home, and it’ll read whatever is written in your script.

I am doing the the same thing, but instead of hard disk space, I have google tell me the weather condition and how much charge is left on my iphone battery.

1 Like

Thanks
How do you get ifttt not to respond?

Hi guys,

I’m pretty new this whole automation stuff, do you guys have an example how you do the script?

You can do this without IFTTT

Hi, can you share an example?

This is my intent scripts for Alexa. you might be able to adapt to google home.

I ask

Alexa, tell me the status of the front door
Alexa, tell me everything that is on

  statussensor:
    speech:
      type: plain
      text: >
        {%- for state in states -%}
          {%- if state.name.lower() == Sensor.lower() -%}
            {%- if loop.first %}The {% elif loop.last %} and the {% else %}, the {% endif -%}
            {{ state.name }} status is {{ state.state }} {{- state.attributes.unit_of_measurement}}
          {%- endif -%}
        {%- else -%}
          Sorry, I can't find the status of {{ state.name }}
        {%- endfor -%}
  allsensors:
    speech:
      type: plain
      text: >
        {%- for state in states.switch -%}
          {%- if state.state == ASensor.lower() -%}
            {%- if loop.first %}The {% elif loop.last %} and the {% else %}, the {% endif -%}
              {{ state.name }} status is {{ state.state }} {{- state.attributes.unit_of_measurement}}
          {%- endif -%}
        {%- else -%}
          Sorry, I can't find anything in state of {{ ASensor }}
        {%- endfor -%}
        {%- for state in states.binary_sensor -%}
          {%- if state.state == ASensor.lower() -%}
          {%- if loop.first %}The {% elif loop.last %} and the {% else %}, the {% endif -%}
            {{ state.name }} status is {{ state.state }} {{- state.attributes.unit_of_measurement}}
          {%- endif -%}
        {%- else -%}
          Sorry, I can't find anything in state of {{ ASensor }}
        {%- endfor -%}

here’s mine

good_morning:
alias: Good Morning Greeting
sequence:

  • data_template:
    language: en
    message: ‘{{[’‘Good Morning’’, ‘‘Hello, sleepy head’’, ‘‘Good day’’, ‘‘Its 5:10AM,
    rise and shine!’’] | random }} “Currently its{{states(’‘sensor.yweather_current’’)}}. The
    weather temperature is {{states(’‘sensor.yweather_temperature’’)}}degrees
    Celsius. Todays high will reach {{states(’‘sensor.yweather_temperature_max’’)}}
    degrees Celsius” “Have a wonderful day”’

    entity_id: media_player.living_room_speaker
    service: tts.google_say

2 Likes

Not sure what you mean by this. Are you saying that you don’t want a response message from Google Home? If so, you can try typing a character with no phonetic value like △ in the Google Home response field.

I am still not too keen on HA’s native support for Google Assistant. Its great for devices like
lights or other devices because you would say “hey google, turn on living room lights”, but for non-physical entities like scripts and scenes, it’s a bit clunky. I would have to say, “hey, google turn on good morning” to run my script. With IFTTT, I can say whatever I want, like “hey google, good morning”, and it will give me the weather report.

You can set a shortcut in Google assistant to avoid that:

I’m afraid that’s not true, the domain available are:
group, scene, script, switct, fan, light, cover, media_player and climate.

Or at least it doesn’t directly work, you still need a script for each sensor…

Hi that’s what i was wanting to know. I don’t want a custom response via iftt.
Thank you.

Doing it this way means google with give a response like activating “good morning”

Or is there away to turn this off?

No,I’m afraid there is no way to turn that off for now…

I tried to see how the API from google work but it seems the smart home component cannot reply to simple query.
For a thermostat it can give back the set temperature, but a device that just deliver a value was not planned.

Another way is to use Google Action, but it would mean having to say something like “Ok Google, ask home-assistant what’s the temperature in the living room”, which is also far from perfect.

1 Like

i’ve tried setting up an ifttt trigger but there something wrong their end i think as i cant add new triggers, only current active ones work

IFTTT is working fine. I just used it a second ago

Are you able to create a new trigger. My current triggers work yet new ones dont

yes ,…no problems

Yesterday it wasn’t working there’s is s few posts on reddit ifttt too.
All seems good today

I have been experimenting with Stringify. Asside from having to say “ok, google. tell stringify…”, its works a lot better than IFTTT. You can string a lot of triiggers and actions together.

You can use the maker component to call scripts in HA Good alternative to IFTTT