jcallaghan / home-assistant-config

My Home Assistant configuration & documentation.
https://www.jcallaghan.com/
MIT License
173 stars 8 forks source link

Nest smoke alarm integration 🔥🚨🧯 #225

Open jcallaghan opened 3 years ago

jcallaghan commented 3 years ago

Objective

Integrate Nest Protect smoke alarms with Home Assistant.

Goals

Notes

  1. I was previously blocked in integrating my Nest Protects. Once Nest became Google Home, we lost the ability to integrate them with Home Assistant. The Nest Protects are not available/supported via Google SDM but I found Mick's Nest Protect integration last week (13-Mar 2022).

Related

Reference

CCOSTAN commented 3 years ago

Did you check out Bad nest?

I'm able to have mine integrated but I've had my developer account for years. https://github.com/CCOSTAN/Home-AssistantConfig/blob/master/config/packages/nest_protects.yaml

jcallaghan commented 3 years ago

I've not and my Google Developer account was migrated sadly.

Paulus suggested the API might be opening back up again soon (source "Hey Google" smart home summit). https://twitter.com/balloob/status/1280923380313501697

jcallaghan commented 2 years ago

Nest Protect integration

I came across @iMicknl's Nest Protect integration for Home Assistant. This solves my Nest Project integration problem until Google SDM finally gets around to supporting Nest Protects.

I have created a Security & Safety Lovelace dashboard where we have dedicated panels relating to the different aspects of security and safety in our home, this now includes our Smoke Alarms! This panel shows me useful information from each of my Nest Protect units.

Below are examples of two cards I created. Note: I am leveraging Simple Icons for the header icon and multiple-entity-row card. I plan to add a few additional units and have stuck with the last example for now.

image

type: entities
entities:
  - type: weblink
    url: https://home.nest.com/protect/
    name: Nest Project Dashboard
  - type: section
    label: Nodes
  - entity: device_tracker.appliance_nest_protect_downstairs
    icon: mdi:smoke-detector
    name: Downstairs
    secondary_info: last-updated
  - entity: device_tracker.appliance_nest_protect_upstairs
    icon: mdi:smoke-detector
    name: Upstairs
    secondary_info: last-updated
  - type: section
    label: Status
  - entity: binary_sensor.nest_protect_upstairs_co_status
    type: custom:multiple-entity-row
    name: Carbon Monoxide (CO)
    secondary_info: last-changed
    show_state: false
    entities:
      - entity: binary_sensor.nest_protect_downstairs_co_status
        name: Downstairs
      - entity: binary_sensor.nest_protect_upstairs_co_status
        name: Upstairs
  - entity: binary_sensor.nest_protect_upstairs_heat_status
    type: custom:multiple-entity-row
    name: Heat
    secondary_info: last-changed
    show_state: false
    entities:
      - entity: binary_sensor.nest_protect_downstairs_heat_status
        name: Downstairs
      - entity: binary_sensor.nest_protect_upstairs_heat_status
        name: Upstairs
  - entity: binary_sensor.nest_protect_upstairs_smoke_status
    type: custom:multiple-entity-row
    name: Smoke
    secondary_info: last-changed
    show_state: false
    entities:
      - entity: binary_sensor.nest_protect_downstairs_smoke_status
        name: Downstairs
      - entity: binary_sensor.nest_protect_upstairs_smoke_status
        name: Upstairs
  - entity: binary_sensor.nest_protect_downstairs_battery_health
    type: custom:multiple-entity-row
    name: Battery Health
    secondary_info: last-changed
    show_state: false
    entities:
      - entity: binary_sensor.nest_protect_downstairs_battery_health
        name: Downstairs
      - entity: binary_sensor.nest_protect_upstairs_battery_health
        name: Upstairs
state_color: true
show_header_toggle: false
title: Nest Protect
icon: si:google
view_layout:
  position: sidebar
header:
  type: picture
  image: /local/images/brand/nest-project-product.png
  tap_action:
    action: none
  hold_action:
    action: none

image

type: entities
entities:
  - type: weblink
    url: https://home.nest.com/protect/
    name: Nest Project Dashboard
  - type: section
    label: Status
  - entity: device_tracker.appliance_nest_protect_downstairs
    type: custom:multiple-entity-row
    icon: mdi:smoke-detector
    name: Downstairs
    secondary_info: last-updated
    show_state: false
    entities:
      - entity: binary_sensor.nest_protect_downstairs_co_status
        name: CO
      - entity: binary_sensor.nest_protect_downstairs_heat_status
        name: Heat
      - entity: binary_sensor.nest_protect_downstairs_smoke_status
        name: Smoke
      - entity: binary_sensor.nest_protect_downstairs_battery_health
        name: Battery
  - entity: device_tracker.appliance_nest_protect_upstairs
    type: custom:multiple-entity-row
    icon: mdi:smoke-detector
    name: Upstairs
    secondary_info: last-updated
    show_state: false
    entities:
      - entity: binary_sensor.nest_protect_upstairs_co_status
        name: CO
      - entity: binary_sensor.nest_protect_upstairs_heat_status
        name: Heat
      - entity: binary_sensor.nest_protect_upstairs_smoke_status
        name: Smoke
      - entity: binary_sensor.nest_protect_upstairs_battery_health
        name: Battery
  - type: section
    label: Nodes
  - entity: device_tracker.appliance_nest_protect_downstairs
    icon: mdi:smoke-detector
    name: Downstairs
    secondary_info: last-updated
  - entity: device_tracker.appliance_nest_protect_upstairs
    icon: mdi:smoke-detector
    name: Upstairs
    secondary_info: last-updated
state_color: true
show_header_toggle: false
title: Nest Protect
icon: si:google
view_layout:
  position: sidebar
header:
  type: picture
  image: /local/images/brand/nest-project-product.png
  tap_action:
    action: none
  hold_action:
    action: none
jcallaghan commented 2 years ago

Lovelace

Here is the Lovelace card I have settled with for now. I think this will work well with additional Nest Protects.

image

I also show more information when debug mode is enabled. Debug mode is something I've setup to show me more information or send me additional information in notifications. It's just an input_boolean helper that I toggle on and off as and when needed.

image

YAML

type: vertical-stack
cards:
  - type: entities
    entities:
      - type: weblink
        url: https://home.nest.com/protect/
        name: Nest Project Dashboard
        icon: mdi:open-in-new
      - type: weblink
        url: x/appliances/Smoke-Alarms/Smoke-Alarms.md
        name: Household Wiki > Appliances > Smoke Alarms
        icon: si:markdown
      - type: section
        label: Smoke Alarms
      - entity: device_tracker.appliance_nest_protect_downstairs
        type: custom:multiple-entity-row
        icon: mdi:smoke-detector
        name: Downstairs
        secondary_info: last-updated
        show_state: false
        entities:
          - entity: binary_sensor.nest_protect_downstairs_co_status
            name: CO
          - entity: binary_sensor.nest_protect_downstairs_heat_status
            name: Heat
          - entity: binary_sensor.nest_protect_downstairs_smoke_status
            name: Smoke
          - entity: binary_sensor.nest_protect_downstairs_battery_health
            name: Battery
          - entity: device_tracker.appliance_nest_protect_downstairs
            name: Network
      - entity: device_tracker.appliance_nest_protect_upstairs
        type: custom:multiple-entity-row
        icon: mdi:smoke-detector
        name: Upstairs
        secondary_info: last-updated
        show_state: false
        entities:
          - entity: binary_sensor.nest_protect_upstairs_co_status
            name: CO
          - entity: binary_sensor.nest_protect_upstairs_heat_status
            name: Heat
          - entity: binary_sensor.nest_protect_upstairs_smoke_status
            name: Smoke
          - entity: binary_sensor.nest_protect_upstairs_battery_health
            name: Battery
          - entity: device_tracker.appliance_nest_protect_upstairs
            name: Network
    state_color: true
    show_header_toggle: false
    title: Nest Protect
    icon: si:google
    view_layout:
      position: sidebar
    header:
      type: picture
      image: /local/images/brand/nest-project-product.png
      tap_action:
        action: none
      hold_action:
        action: none
  - type: conditional
    conditions:
      - entity: input_boolean.debug_mode
        state: 'on'
    card:
      type: entities
      entities:
        - type: weblink
          url: x/appliances/Smoke-Alarms/Smoke-Alarms.md
          name: Household Wiki > Appliances > Smoke Alarms
          icon: si:markdown
        - type: weblink
          url: https://github.com/jcallaghan/home-assistant-config/issues/225
          name: '#225 Nest smoke alarm integration'
          icon: mdi:github
        - entity: group.smoke_alarms
        - entity: automation.security_smoke_alarms
          secondary_info: last-triggered
      title: Helpers
      state_color: true
      show_header_toggle: false
      theme: post-it