Tankerkoenig
The Tankerkoenig integration allows you to monitor the fuel prices with tankerkoenig.de from within Home Assistant and setup automations based on the information.
Prerequisites
To use this integration, you need an API key from tankerkoenig.
- Go to tankerkoenig API and in the top right, select API-KEY.
- Fill out the form and request a free API key.
:::important The Terms & Conditions of tankerkoenig.de specify that the API is not meant for massive data fetching, but it does not explicitly mention a limit. Having a maximum of 10 monitored fuel stations is recommended, and a warning will be issued otherwise. If you consider to define a custom polling interval, then please keep in mind that requests should be limited to less than once every 5 minutes.
::: :::note 配置 此集成可通过 UI 配置。前往 设置 > 设备与服务 添加。 :::
Options
To define options for Tankerkoenig, follow these steps:
-
In Home Assistant, go to Settings > Devices & services.
-
If multiple instances of Tankerkoenig are configured, choose the instance you want to configure.
-
On the card, select the cogwheel
. - If the card does not have a cogwheel, the integration does not support options for this device.

-
Edit the options, then select Submit to save the changes.
Data updates
This integration fetches the data every 30 minutes from the tankerkoenig API.
Provides entities
This integrations provides a set of Binary sensor and Sensor entities for each selected gas station.
As the data of tankerkoenig.de is based on data from the German market transparency office for fuels (Markttransparenzstelle für Kraftstoffe MTS-K), only the three base fuel types Diesel, Super, and Super E10 are available.
Usage examples
Show current fuel price only when station is opened
The example below uses the common sensor card in the frontend and adds a visibility condition.
Troubleshooting
Before reporting an issue, enable debug logging and restart the integration. As soon as the issue re-occurs, stop the debug logging again (download of debug log file will start automatically). Further, if still possible, download the diagnostics data. If you have collected the debug log and the diagnostics data, include them in the issue report.
Remove the integration
To remove an integration instance from Home Assistant
- Go to Settings > Devices & services and select the integration card.
- From the list of devices, select the integration instance you want to remove.
- Next to the entry, select the three-dot
menu. Then, select Delete.

