Automation to disable Nest Thermostat

My Nest thermostat controls a 5 ton AC system. The air handler is in a closet which has a sliding cabinet that can be positioned to cover it in the winter months. The space saving and aesthetics are nice, but obviously there is an issue with this design should the intake be blocked when the compressor is operating. I would like to install a limit switch that would allow for the AC system to turn on only if the sliding shelf is in its proper ‘home’ position, via an automation. It could also send a notification to alert the user about the shelf position. Is this possible with the Nest component integration?

Thank you,

-Revel

minor edits for clarity!

The Nest integration allows control of fan (on or auto) and system mode (off, heat, cool, auto or eco), and provides current hvac state (off, heating or cooling, as well as other controls and sensors.) Assuming you can create a binary sensor in HA corresponding to the state of your limit switch, this should definitely be possible. E.g., if the limit switch changes and the door is closed, turn off the system. Or, if the system is turned on manually while the limit switch indicates the door is closed, turn the system back off. You can also have it notify you in these events.

1 Like

If it helps, I’m using a script via automation to set nest to home mode, but I’m sure you can automate or script to meet your needs.

Automation:

- alias: "Nest Home Mode"
  hide_entity: true
  initial_state: true
  trigger:
    - platform: state
      entity_id: climate.living_room
      to: 'eco'
  condition:
    condition: and
    conditions:
      - condition: template
        value_template: '{{ states.sensor.pws_temp_f.state < 65 }}'
      - condition: or
        conditions:
          - condition: state
            entity_id: 'device_tracker.me'
            state: 'home'
          - condition: state
            entity_id: 'device_tracker.her'
            state: 'home'
  action:
  - service: script.turn_on
    entity_id: script.nest_home_mode
  - service: script.turn_on
    entity_id: script.sonos_tts
    data_template:
      variables:
        where: "living_room"
        what: "Nest, has been set to home, and the {{states.climate.living_room.state}} has been turned on."

Script:

alias: Nest Home Mode
sequence:
  - service: nest.set_mode
    data:
      home_mode: home
1 Like

@pnbruckner Great. I can definitely create a binary sensor- I can use the ‘Door’ class :+1: I need to find a reliable sensor and means of communicating back to HA, something hardwired I would imagine.

@Coolie1101 it does help actually, thank you. I can always use a lil nudge with YAML, and this looks like a great beginning point.

How do I make this as reliable as possible? This gets at an issue I’ve been wondering about for a while with HA- Assuming proper hardware design and scripting, is HA the right tool to use in a circumstance where expensive machinery depends on it to run safely?

Hey man, this is open source project, NO WARRANTY

I will suggest you read this blog written by Paulus.

I am very aware that this is an open source project, but thanks for the reminder. I am also aware of the blog post you linked. It appears to me you are implying that I should not be using home assistant for this particular application, and / or that I should be aware of its limitations… thank you?

I would install a switch on it wired like some float switches in the pan where it shuts the entire unit down without any tech except for a switch. Usually the metal doors on the unit are the same way to prevent you from running the unit with the inspection panels off.

Yes, this is where I ended up. Its the ultimate redundancy / safeguard. HA is still used, but a hardwired backup is the key here.

Thanks!