Giter Site home page Giter Site logo

clutwo / home_assistant_tgtg Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chouffy/home_assistant_tgtg

0.0 0.0 0.0 84 KB

TooGoodToGo items stock as sensor in Home Assistant

License: MIT License

Shell 2.24% Python 88.45% Dockerfile 9.30%

home_assistant_tgtg's Introduction

TooGoodToGo items stock as a sensor in Home Assistant

This aim to show the stock of one or multiple TooGoodToGo item using the tgtg-python library. Sensor data can be used afterward to generate notifications, history graphs, ... share your best examples in the Discussion tab!

Usage

Installation via HACS

  1. Search for TooGoodToGo in the Integration tab of HACS
  2. Click Install
  3. Restart the Home Assistant server
  4. Go to Configuration -> Devices & Services and setup a new TGTG integration using your email

Features

  • No Docker-Container needed!!!
  • No local Python-Scripts and knowledge needed!!!
  • Fetch each item stock defined
  • ConfigFlow for easy configuration
  • Retrieve all favorites
  • Retrieve additional information as attributes, if available:
    • Item ID
    • Store ID
    • TooGoodToGo price and original value
    • Pick-up start and end
    • Sold-out date
    • Sales Window
    • Store Logo URL

How is it polling the data

  • This integration is polling all favourites every 15 minutes.
  • Every 2 hours the details of an item (for every item in favourites list) are fetched to update the saleswindow and/or pickup dates and other data of the item
  • If an item is inside his saleswindow (from start of saleswindow till 10 minutes later) it will be fetched more frequently (every 3 minutes)

Example Automation

As example we'll create a notification using the HomeAssistant Companion App on your smartphone.

alias: TGTG Q1 Notification
description: ""
trigger:
  - platform: numeric_state
    entity_id: sensor.schaal_mehr_als_tanken_q1_tankstelle_karlsruhe_uberraschungstute
    above: 0
condition: []
action:
  - service: notify.notify
    data:
      message: Q1 gas station has new packages available
      title: TGTG Notification
mode: single

As soon as the number of your entry is higher than 0, this is immediately sent to you via push notification to the Companion App and displayed on your cell phone.

home_assistant_tgtg's People

Contributors

chouffy avatar tjorim avatar mricharz avatar dependabot[bot] avatar azcn2503 avatar daviddesloovere avatar huizebruin avatar goegol 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.