Code Monkey home page Code Monkey logo

homeassistant-snoo's Introduction

homeassistant-snoo

This is a fork of the original homeassistant-snoo project by Peter Hardy. I wanted to make some adjustments to the code to make it available in HACS, and also fix a bug with the way the config is stored/retrieved in homeassistant.

This is a Home Assistant custom component to retreive the status of a SNOO Smart Bassinet. It creates a sensor showing the current session status (awake, asleep or soothing), as well as the current soothe level when soothing.

This component is made possible by the snoo Python module. Note that it is only possible to read the current status. Sending commands is not supported, and won't be in the forseeable future.

Installation

Copy the contents of the custom_components directory to the custom_components directory in your Home Assistant configuration directory, and restart Home Assistant.

Usage

The component does not (yet) support YAML configuration. Create a new integration through the Home Assistant UI. The component requires your username and password for your Happiest Baby account.

If successful, the component adds a new sensor.snoo_state sensor. This will have one of these states:

  • Awake: The SNOO is inactive.
  • Asleep: The SNOO is active, and baby is calm.
  • Soothing: The SNOO has detected baby is unsettled, and is attempting to soothe.

Additionally, the sensor exposes these attributes:

  • level: When state is Soothing, this attribute will be a number indicating the soothing level, between 1 and 4. At all other times level is 0.
  • session_start_time: The time since the last session started, reported by the API in UTC. Note that this only updates when transitioning to or from the Awake state. Going from Asleep to Soothing or back again does not change this time.

homeassistant-snoo's People

Contributors

sstratoti avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.