Skip to content

Instantly share code, notes, and snippets.

View Danielhiversen's full-sized avatar

Daniel Hjelseth Høyer Danielhiversen

View GitHub Profile
"""Support for Tibber sensors."""
from __future__ import annotations
import asyncio
from dataclasses import dataclass
from datetime import timedelta
from enum import Enum
import logging
from random import randrange
from tibber.const import RESOLUTION_DAILY
@Danielhiversen
Danielhiversen / Tibber_high_prices.yaml
Last active September 10, 2022 07:36
This automation blueprint sends a notification on high energy price.
blueprint:
name: High electricity price
description: 'This automation blueprint sends a notification on high energy price.'
domain: automation
input:
energy_sensor:
name: Tibber price sensor
selector:
entity:
integration: tibber
# pip install openpyxl pyTibber
import tibber
import openpyxl
YOUR_TIBBER_TOKEN = 'd1007ead2dc84a2b82f0de19451c5fb22112f7ae11d19bf2bedb224a003ff74a'
if __name__ == '__main__':
tibber_connection = tibber.Tibber(access_token=YOUR_TIBBER_TOKEN)
tibber_connection.sync_update_info()