Add doc for Nightscout integration (#14185)

Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
Marcio Granzotto Rodrigues 2020-08-11 06:11:56 -03:00 committed by GitHub
parent ada87fd8b7
commit 32ecd4a529
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,49 @@
---
title: Nightscout
description: Instructions on how to integrate your Nightscout CGM data into Home Assistant.
ha_category:
- Sensor
ha_release: 0.115
ha_iot_class: Cloud Polling
ha_config_flow: true
ha_codeowners:
- '@marciogranzotto'
ha_domain: nightscout
---
The Nightscout integration allows you to view your CGM data from [Nightscout](http://www.nightscout.info/) in Home Assistant.
## Configuration
To add `Nightscout` to your installation, go to **Configuration** >> **Integrations** in the UI, click the button with `+` sign and from the list of integrations select **Nightscout**.
Then just input your server URL in the `Host` field. For example:
- `https://localhost:5423`
- `https://your-app-name.herokuapp.com`
### Sensor
If you have a sensor session running, and once you have enabled the Nightscout integration, you should see a `sensor.blood_glucose` entity.
It's icon changes to indicate the direction or trend, of the glucose readings.
The state is the last reading from Nightscout, and you can see other information about the reading in the sensor's attributes.
### Example Automation
```yaml
- id: '1234567890123'
alias: overnight_low_kitchen_lights
description: Turn on the lights in the kitchen if my blood sugar drops low overnight
trigger:
- below: '65'
entity_id: sensor.blood_glucose
platform: numeric_state
condition: time
after: '22:00:00'
before: '06:00:00'
action:
- service: light.turn_on
data:
entity_id: light.kitchen
```