Coder Social home page Coder Social logo

hass's Introduction

Home Assistant custom sensors

IKEA Availability sensor

This sensor retrieves the number of available units in stock of a product at the specified IKEA store. Use it to trigger a notification when a product is back in stock or similar.

Installation

Copy the ikea.py script to your custom components directory: <HASS_DIR>/custom_components/sensor.

Configuration

Add an IKEA availability sensor using the sensor platform:

sensor:
  - platform: ikea
    product_id: 40364748
    store: '012'
    url_locale: se/sv
    friendly_name: Trådfri wireless control outlet

Configuration variables

product_id
   (string) (Required) The id of the product you want to monitor. You will find the product id
   in the URL of the product page on ikea.com, example: https://www.ikea.com/se/sv/catalog/products/<product_id>

store
   (string) (Required) The id of the store to check availability in. Some countries are available here, but if your country is
   missing, retrieve your store id from the HTML of the availability drop down list on the product page at IKEA.
   Note: use single quotes around the store_id to make sure it gets interpreted as a string and not a number.

url_locale
   (string) (Required) The locale to use in the URL when querying IKEA. Check your country specific IKEA website URL
   Examples: sv/se - Sweden. fi/fi - Finland, and so on.

friendly_name
   (string) (Optional) Give the sensor a friendly name, otherwise it will be named ikea_<product_id>

Notes

The sensor will update its value every 5 minutes. However, it's unclear how often IKEA updates the values reported through their API.

hass's People

Contributors

pp-svanstrom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

e1miran

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.