[SOLVED] Nest thermostat status home/away

Yeah i did, i’m just fiddling to get it working in my config. I’ll keep you posted :slight_smile:

So far no luck. If i run it on templates in the webUI it gives the right state, but when i add it to the config it gives the wrong state… :frowning:

Almost there but not quite.

# Nest away sensor
  - platform: template
    sensors:
      away_mode:
        friendly_name: "Away mode sensor"
        value_template: "{% if states.climate.downstairs.attributes.away_mode %}
  {% if is_state('sensor.away_mode', 'off') %}
    Thuis
  {% else %}
    Weg
  {% endif %}
{% else %}
  unknown
{% endif %}"

check your syntax and indentations.

If you are using it the way it is posted above, it won’t work.

Using the custom UI works fine for me:
image

I did tweak my comment above a bit. Instead of setting state, I set _stateDisplay.

If you really want to do it in the sensors, you can just use a single template sensor:

- platform: template
  sensors:
    dining_room_thermostat_away_mode:
      value_template: >
        {% if is_state_attr('climate.dining_room', 'away_mode', 'off') %}
          Home
        {% else %}
          Away
        {% endif %}
1 Like

Thank you so much. This works!

# Nest away sensor
  - platform: template
    sensors:
      away_mode:
        friendly_name: "Thuis of weg"
        value_template: >
          {% if is_state_attr('climate.downstairs', 'away_mode', 'off') %}
            Thuis
          {% else %}
            Weg
          {% endif %}

What is the benefit of using the custom UI?

I just like having the sensor as a binary sensor so I can use it in automations as a boolean. I use Node-RED for automations and there’s cases where it’s just nice to have in boolean form. Then it’s just one less sensor that needs to be defined simply to display properly (separation of backend vs frontend responsibilities). The boolean sensor will also highlight the icon when it’s considered ‘on’, that may or may not be what you want.

If you really get into custom UI, you could probably get it to show the away mode on the climate entity’s card itself rather than needing a separate state card for it. That’s ultimately how I’d like to do it but I haven’t gotten around to it yet. For example, something like these would be nice, but they currently don’t work for climate.

If you don’t care about any of that, I don’t really know of any problem with just using the template sensor like that.

That slider is cool!

But i’m afraid it would cause me a lot of headache trying to set it up. I couldn’t even figure out this template :smiley:

I’m trying to keep it simple for now, get everything to work the way i like and leave the fine tuning for later (when i get the hang of it).

But thanks a lot for your help!

Hi tboyce1,
How did you get to this : put the humidit and away mode into climate card? Thanks.

They’re just three separate entities in a group: climate, humidity sensor (from Nest component), and a template sensor for the away_mode attribute of climate.

Like this:

  nest_thermostat:
    name: Thermostat
    view: no
    entities:
      - climate.downstairs
      - sensor.downstairs_thermostat_humidity
      - sensor.downstairs_thermostat_operation_mode
      - sensor.downstairs_thermostat_target
      - sensor.downstairs_thermostat_temperature
      - sensor.away_mode

@ tboyce1, Marie11e, Oh, yes, thank you very much!

Is any one else unable to change the the desired temp with the Nest controls?
The number changes bit it does not change the thermostat.

I know this is an old thread… I am wondering if the home/away status is available in the current Nest thermostat integration?

1 Like

I just had to upgrade from legacy Nest integration to the newer version hooked in with google, and i lost a lot of sensors. Is this normal? any way to get some of those back, specifically the home/away?

2 Likes

Same issue here. Would be really useful to have this, but it doesn’t seem available?

Home/Away is not exposed in the SDM API. Smart Device Management API  |  Device Access  |  Google Developers

You may want to try some of the integrations that use unofficial / unsupported APIs and like badnest or homebridge.

This is a pretty frustrating missing feature. probably one of the most useful features besides being able to change the temp and getting some status about temp/humidity.

was really hoping to use my home status, schedule, and geofencing to set the home and away based on some complicated things like day of week, times of day, and energy rate. now all I can do is set specific temps which is not as convenient as setting a nest schedule and an away ‘don’t exceed temp’ and then just telling nest when you are away or not. i guess this is fine too…

Would you know why my Nest Thermostat integration I do not have the Away_Mode?

You can use the Google assistant integration for this Exposing Google Home/Away mode to Home Assistant

Nest does not return this in the API as I mentioned a few messages ago.