IFTTT request DHT11 temperature and humidity with Google Assistant

Hi, I’m struggling to do the same, I can’t get google Assistant to see my MQTT temperature.
Do you know what I’m missing.

My Config:
google_assistant:
project_id: xxxxxxxxxx
client_id: xxxxxxxxxxx
access_token: xxxxxxxxxxxx
exposed_domains:
- switch
- light
- script
- scene
- climate
sensor:

  • platform: mqtt
    state_topic: ‘tele/geyser/SENSOR’
    name: ‘Geyser Temperature’
    unit_of_measurement: ‘°C’
    value_template: ‘{{ value_json.DS18B20.Temperature }}’
    switch:
  • platform: mqtt
    name: ‘Geyser’
    state_topic: “stat/geyser/POWER”
    command_topic: “cmnd/geyser/POWER”
    qos: 1
    payload_on: “ON”
    payload_off: “OFF”
    retain: false

My Customize.yaml
switch.geyser:
homebridge_visible: true
friendly_name: Geyser
google_assistant: true
google_assistant_type: switch
sensor.geyser_temperature:
homebridge_visible: true
friendly_name: Geyser Temperature
google_assistant: true
google_assistant_type: climate

I’m on the latest HA version 0.62.1
If anyone has a nice timer interface for my Geyser / Hot Water Boiler that would be great :slight_smile:

how do you ask them the humidity? because to me it says that the sensor is not accessible, I have a DHT11 and the humidity calculates it as a percentage

You need to update your configuration, the google assistant component no longer uses customize.yaml to expose entities. Read the updated documentation.

I have update Home assistant and the temperature works, but the humidity can not read says “unable reading humidity”

I got this “working”, but I’m getting some strange responses from Google Assistant. I have my google_assistant entity_config setup as shown below. I resync my devices and then in the Google Assistant android app settings under Home control, I assign sensor1 and sensor2 to the room “Wine Cellar”. Note, I am using the MQTT sensor HA component.

If I ask “What is the wine cellar temperature”, I get the response “Sensor 1 is off and it’s currently 48 degrees. Unable to reach sensor 2.”

If I ask “What is the wine cellar humidity”, I get the response “Sensor 2 shows the humidity is 58 percent. Unable to reach sensor 2.”

So… I guess this is just how this works currently? Has anyone found a way to configure this so it doesn’t tell you about the other sensor, and so it doesn’t say the temperature sensor “is off”?

  entity_config:
    sensor.wine_cellar_temperature:
      expose: true
      type: climate
      name: sensor1
    sensor.wine_cellar_humidity:
      expose: true
      type: climate
      name: sensor2

It looks like they were seeing this same behavior in the comments for the associated pull request:
https://github.com/home-assistant/home-assistant/pull/11095

Its the way you are naming your entities, you have asked wine cellar so it queries both sensors. If you ask ‘hey google what is the temperature in sensor1?’ it will give you the sensor state and value only. Or ‘hey google what is the humidity in sensor2?’ will respond with just the humidity value.

To further break down the confusion, you can expose things in several ways, below it is set to NOT expose anything by default:

  project_id: !secret ga_project_id
  client_id: !secret ga_client_id
  access_token: !secret ga_token_id
  agent_user_id: !secret ga_agent_id
  api_key: !secret ga_api_key_id
  expose_by_default: false
  entity_config:

Because we don’t expose everything, you need to state expose: true to google assistant, type is climate to expose temperature and the value required must be C/F:

    sensor.aeotec_ms_kitchen_temperature:
      type: climate
      expose: true
      name: kitchen

To call the sensor from google assistant you will need to state something similar to ‘hey google what is the temperature in the kitchen?’. You will receive the sensor state and temp value.

The sensor for humidity is exposed in a similar manner to temperature, type being climate. This requires your sensor measurement to be %.Take note of the sensor name being exposed to google as it must be unique to work and I’ve found putting sensor after the room name to make it feel natural:

    sensor.aeotec_ms_kitchen_relative_humidity:
      type: climate
      expose: true
      name: kitchen sensor

To call you state ‘hey google what is the humidity in the kitchen sensor?’. It will return only the humidity value.

I did so but google assistant tells me “umidity unable to reading”

Post your updated entity_config and show or tell me the name you have the sensor in your google home app. The only time I get an error like that is if it is trying to get the humidity from the temperature sensor.

my entity_config is:

  exposed_domains:
    - switch
    - light
    - group
    - climate
  entity_config:
    sensor.dht_sensor_temperature:
      name: temperature
      expose: true
      aliases:
        - temperature room
      type: climate
    sensor.dht_sensor_humidity:
      name: humidity
      expose: true
      aliases:
        - humidity room
      type: climate

Temperature sensor name in Google Assistant is “temperature” and name sensor humidity in Google Assistant is “humidity”.

@rwgamer It doesn’t let me put type: climate in the config. Here is the error I get:

2018-04-13 14:09:50 ERROR (MainThread) [homeassistant.components] Invalid config for [google_assistant]: [type] is an invalid option for [google_assistant]. Check: google_assistant->google_assistant->entity_config->sensor.temperature->type. (See /home/homeassistant/.homeassistant/configuration.yaml, line 44). Please check the docs at https://home-assistant.io/components/google_assistant/

Type is no longer supported in HA since version 65

In that case how to you read sensor for google assistant?

You can setup the temperature sensor as a generic thermostat, then expose that thermostat as a climate device to google assistant.

Would you mind if you share a config example?

Anyone willing to share how to get Google Home to be able to access sensors in Hass.io using the Google Assistant component?

I have several Xiaomi and 433 MHz sensors in Hass.io but I can seem to get Google Home to get the values. I want to be able to ask my Google Home “what’s the temperature in the living room?”.

Here is an example @Norik_Krasniqi:

- platform: generic_thermostat
  name: Living Room Heater
  heater: input_boolean.fake_heater
  target_sensor: sensor.living_room_temperature
  initial_operation_mode: "off"
  target_temp: 21

Just add the sensor in question as target_sensor. you also have to create some kind of switch for the heater. I’ve created an input_boolean for that.

To avoid showing that useless input in the ui I’ve added the following to my customize.yaml

input_boolean.fake_heater:
  hidden: true

@n0ir: all i did was following the tutorial:

@Florian When it comes to googleassistant how do you get that exposed because i tried to expose through domain (- climate) or individually as entity but no luck.

Never mind, I got that resolved. Thanks!

Hi,

Is this setup still working? I get an error:

Invalid config for [google_assistant]: [type] is an invalid option for [google_assistant]

Thanks