Giter Club home page Giter Club logo

homeassistant-tankerkoenig's Introduction

Tankerkoenig Component

Version mantained

maintainer

Installation

  1. Install this component by copying the files to your /custom_components/ folder
  2. Add this to your configuration.yaml using the config options below example.
  3. You will need to restart for the component to start working
tankerkoenig:
  api_key: YOUR_API_KEY
  monitored_conditions:
    - e5
    - e10
    - diesel
    - state
  stations:
    - id: '11571341-3296-4f16-a363-28b8c188872c'
      name: 'Aral - Kölner_Str.'
      street: 'Kölner Straße'
      brand: ARAL

Options

key default required description
api_key yes The API_KEY from Tankerkönig (descibed below)
monitored_conditions [e5, e10, diesel, state] no What should be monitored

Stations

key default required description
id yes The ID of the station (descibed below)
name tankerkoenig_[ID] no Custom name of the station, used for the sensors
street no Street of the station
brand no Brand of the station

Description

To create the API-KEY and find the IDs of the stations follow the first steps of the blog-post: https://www.panbachi.de/tankerkoenig-preise-in-home-assistant-darstellen-141/

The component will create three sensors and one binary_sensor for each station:

  • sensor.NAME_e5
  • sensor.NAME_e10
  • sensor.NAME_diesel
  • binary_sensor.NAME_state

The sensors are used for the price and the binary_sensor is used for the state if the station is currently open or not and additionally stores the street and brand (if they were set).


Due to how custom_components are loaded, it is normal to see a ModuleNotFoundError error on first boot after adding this, to resolve it, restart Home-Assistant.


Support me / Follow me

Web Facebook Twitter Instagram YouTube

homeassistant-tankerkoenig's People

Contributors

dannyqwertz avatar hn-gz avatar magenbrot avatar napsio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homeassistant-tankerkoenig's Issues

unit of measurement as table name in influxdb

In my configuration.yaml I have a influxdb directive to write gasoline prices to influxdb. But in influxdb, the values have the name "€" instead of "sensor.gasoline_station1".
This is a bug in home assistant but the developers call it a feature:
home-assistant/core#2333
(If you read https://docs.influxdata.com/influxdb/v1.7/concepts/key_concepts/#measurement you see that it is clearly a bug in home assistant)

If I understand the code correctly, this could be fixed with "override_measurement: ...." for the sensor.

typo sensor.py

Hi,

du hast da eine "typo" hust

zitat creativecommons.tankerkoenig.de:
(Home-Automation-, Smart-Mirror- und ähnliche Systeme sollten Abfragen nicht öfter als einmal in 5 Minuten durchführen. )

Dein blob/master/custom_components/tankerkoenig/sensor.py sieht so aus
SCAN_INTERVAL = timedelta(seconds=5)

Du wolltest da sicher sowas schreiben:
SCAN_INTERVAL = timedelta(minutes=5)

Ansonsten goil

Gruß

Component breaks Home Assistant history

I've installed and configured this component and everything was looking fine. Today I noticed that all my history graphs don't show any changes since yesterday.

In the Home Assistant Log I see this error in record/util.py:
Error executing query: Object of type 'timedelta' is not JSON serializable

After removing tankerkoenig: from my configuration.yaml everything works fine.

102 Aral

What about gasoline 102 aral prices?

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.