Home Assistant component for fuel prices from United Consumers.
This integration can be added to HACS as a custom (non-default) repository.
Assuming you have already installed and configured HACS, follow these steps:
- Navigate to the HACS integrations page at
http://<your-home-assistant>:8123/hacs/integrations
. - Click the 3 vertical dots menu in the top right corner.
- Choose 'Custom repositories'
- Enter the name of this repository (
https://github.com/metbril/home-assistant-brandstofprijzen/
) in the text field in the dialog. - Choose 'Integration' from the Category list in the dialog.
- Click 'Add'. The repository will now be added to your HACS.
- Click the 'x' to close the dialog.
- The integration is now visible. Click 'Install', and click 'Install' again.
- Ready! Now continue with the configuration.
- Copy directory
brandstofprijzen
to your<config dir>/custom_components
directory. - Configure Home Assistant.
- Restart Home Assistant.
Please note that you need to also manually update the component with newer versions in the future.
Minimal configuration:
sensor:
- platform: brandstofprijzen
Default configuration:
sensor:
- platform: brandstofprijzen
monitored_variables:
- euro95
- diesel
- lpg
- super
- super_mlv
- premium_benzines
- premium_diesels
icon: mdi:gas-station
unit_of_measurement: €/L
prefix: Adviesprijs
scan_interval:
hours: 1
Example automation to send a notification when a fuel price changes:
automation:
- alias: "Melding bij gewijzigde brandstofprijzen"
id: brandstofprijzen_update_notification
description: >
Send notification when a fuel price changed
trigger:
- platform: state
entity_id:
- sensor.adviesprijs_euro95
- sensor.adviesprijs_diesel
- sensor.adviesprijs_lpg
- sensor.adviesprijs_super
- sensor.adviesprijs_super_mlv
- sensor.adviesprijs_premium_benzines
- sensor.adviesprijs_premium_diesels
condition: "{{ trigger.state.to_state != trigger.state.from_state }}"
action:
- service: notify.notify
data:
title: Adviesprijs gewijzigd
message: >
De adviesprijs voor
{{ state_attr(trigger.entity_id, 'friendly_name') }}
is
{% if trigger.state.to_state > trigger.state.from_state %}
verhoogd.
{% else %}
verlaagd.
{% endif %}
mode: queued
All notable changes to this project will be documented in the changelog.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
All product names, trademarks and registered trademarks in (the images in) this repository, are property of their respective owners. All images in this repository are used by the project for identification purposes only.