Ceerbeerus / beerbolaget

Gives you information about the latest beer available at Systembolaget in Sweden, also known as "Tillfälligt sortiment".
MIT License
4 stars 0 forks source link

Beerbolaget

Beerbolaget is a component which shows the latest beer available at Systembolaget in Sweden, also known as "Tillfälligt sortiment". This component is a great match with the custom card for Home Assistant, Beerbolaget-Card.

What can beerbolaget do?

Upcoming features

Releases

0.4.0

Setup

To add this component to your home assistant configuration, download the folder (beerbolaget) and place it under /custom_components, or install it through HACS.

Then type the following in your configuration.yaml

beerbolaget:

Required/Options

api_key is required to use this component.

Name Required/Option Default Supported options Description
api_key Required None String API key to access the api owned by systembolaget.se
image_url Option None String Source to use when collecting image data for available beer. (https://www.systembolaget.se/api/productsearch/search/sok-dryck)
store Option None String Local store to use when checking availability of beers.
untappd_client_id Option None String API client id to access the api owned by untappd
untappd_secret Option None String API client secret to access the api owned by untappd
untappd_callback Option None String The callback url submited to untappd requesting the api key. (Required format: [YOUR HA URL]/api/untappd)
cache_path Option .untappd-token-cache String File to use for caching the Untappd token

Example

  beerbolaget:
    api_key: !secret systembolaget
    image_url: "https://example.com/api"
    store: "Avenyn"
    untappd_client_id: !secret untappd_client
    untappd_secret: !secret untappd_secret
    untappd_callback: http://my_ha_url.com:8123/api/untappd

Automation example

  # Beerbolaget release notification
  - alias: Beerbolaget Release
    initial_state: on
    trigger:
      platform: state
      entity_id: sensor.beerbolaget
      from: 'False'
      to: 'True'
    action:
      service: notify.mobile_app_xxx_iphone
      data:
        title: "Beerbolaget"
        message: "Nya Små partier: {{ states.sensor.beerbolaget.attributes.release_date }}"
        data:
          push:
            badge: 0