Nightscout

The Nightscout integration allows you to view your CGM data from Nightscout in Home Assistant.

Configuration

To add the Nightscout integration to your Home Assistant instance, use this My button:

Manual configuration steps

If the above My button doesn’t work, you can also perform the following steps manually:

  • Browse to your Home Assistant instance.

  • Go to Settings > Devices & Services.

  • In the bottom right corner, select the Add Integration button.

  • From the list, select Nightscout.

  • Follow the instructions on screen to complete the setup.

If your Nightscout instance requires authentication for API access, you are also required to input the API Key in the configuration form.

Sensor

If you have a sensor session running, and you have enabled the Nightscout integration, you should see a sensor.blood_glucose entity.

The 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

- alias: "overnight_low_kitchen_lights"
  description: Turn on the lights in the kitchen if my blood sugar drops low overnight
  triggers:
  - trigger: numeric_state
    entity_id: sensor.blood_glucose
    below: "65" 
  conditions:
    - condition: time
      after: "22:00:00"
      before: "06:00:00"
  actions:
    - action: light.turn_on
      target:
        entity_id: light.kitchen