2020-05-28 13:15:13 +02:00

2.8 KiB

title, description, ha_category, ha_release, ha_iot_class, ha_quality_scale, ha_codeowners, ha_domain, ha_config_flow
title description ha_category ha_release ha_iot_class ha_quality_scale ha_codeowners ha_domain ha_config_flow
Tibber Instructions on how to integrate Tibber within Home Assistant.
Energy
Sensor
Notifications
0.8 Cloud Polling silver
@danielhiversen
tibber true

The tibber integration provides a sensor with the current electricity price if you are a Tibber customer. If you have a Tibber Pulse or Watty it will also show the electricity consumption in real time.

There is currently support for the following device types within Home Assistant:

Setup

Go to developer.tibber.com/settings/accesstoken to get your API token.

To add Tibber to your installation, go to Configuration >> Integrations in the UI and enable the Tibber integration.

Notifications

Tibber can send a notification by calling the notify service. It will send a notification to all devices registered in the Tibber account.

The requirement is that you have setup the tibber component. To use notifications, please see the getting started with automation page.

Send message

action:
  service: notify.tibber
  data:
    title: Your title
    message: This is a message for you!

Sensor

The tibber sensor provides the current electricity price if you are a Tibber customer. If you have a Tibber Pulse it will also show the electricity consumption in real time.

The requirement is that you have setup the tibber component. The sensor will show once the transfer date to tibber has been confirmed.

Examples

In this section, you will find some real-life examples of how to use this sensor.

Electricity price

The electricity price can be used to make automations. The sensor has a max_price and min_price attribute, with max and min price for the current day. Here is an example to get a notification when the price is above 90% of the maximum price for the day:

{% raw %}

- alias: "Electricity price"
  trigger:
    platform: time_pattern
  # Matches every hour at 1 minutes past whole
    minutes: 1
  condition:
    condition: template
    value_template: '{{ float(states('sensor.electricity_price_hamretunet_10')) > 0.9 * float(state_attr('sensor.electricity_price_hamretunet_10', 'max_price')) }}'
  action:
   - service: notify.pushbullet
     data:
       title: "Electricity price"
       target: "device/daniel_telefon_cat"
       message: "The electricity price is now {{ states('sensor.electricity_price_hamretunet_10') }}"

{% endraw %}